diff --git a/allowed-breaking-changes.txt b/allowed-breaking-changes.txt index b67ae4754c3b7..0901892b553ff 100644 --- a/allowed-breaking-changes.txt +++ b/allowed-breaking-changes.txt @@ -1,4 +1,10 @@ removed:@aws-cdk/aws-ec2.Port.toRuleJSON change-return-type:@aws-cdk/aws-codebuild.PipelineProject.addSecondaryArtifact change-return-type:@aws-cdk/aws-codebuild.Project.addSecondaryArtifact - +removed:@aws-cdk/aws-ec2.Connections.allowFromAnyIPv4 +removed:@aws-cdk/aws-ec2.Connections.allowToAnyIPv4 +removed:@aws-cdk/aws-ec2.VpcProps.maxAZs +removed:@aws-cdk/aws-elasticloadbalancingv2.ApplicationLoadBalancer.metricIPv6ProcessedBytes +removed:@aws-cdk/aws-elasticloadbalancingv2.ApplicationLoadBalancer.metricIPv6RequestCount +removed:@aws-cdk/aws-elasticloadbalancingv2.ApplicationTargetGroup.metricIPv6RequestCount +removed:@aws-cdk/core.Fn.getAZs diff --git a/design/aws-ecs/aws-ecs-autoscaling-queue-worker.md b/design/aws-ecs/aws-ecs-autoscaling-queue-worker.md index acb3e5c4b7a5b..c670d6da28cf7 100644 --- a/design/aws-ecs/aws-ecs-autoscaling-queue-worker.md +++ b/design/aws-ecs/aws-ecs-autoscaling-queue-worker.md @@ -1,6 +1,6 @@ # AWS ECS - L3 Construct for Autoscaling ECS/Fargate Service that Processes Items in a SQS Queue -To address issue [#2396](https://github.com/awslabs/aws-cdk/issues/2396), the AWS ECS CDK construct library should provide a way for customers to create a queue processing service (an AWS ECS/Fargate service that processes items from an sqs queue). This would mean adding new ECS CDK constructs `QueueProcessingEc2Service` and `QueueProcessingFargateService`, that would take in the necessary properties required to create a task definition, an SQS queue as well as an ECS/Fargate service and enable autoscaling for the service based on cpu usage and the SQS queue's approximateNumberOfMessagesVisible metric. +To address issue [#2396](https://github.com/awslabs/aws-cdk/issues/2396), the AWS ECS CDK construct library should provide a way for customers to create a queue processing service (an AWS ECS/Fargate service that processes items from an sqs queue). This would mean adding new ECS CDK constructs `QueueProcessingEc2Service` and `QueueProcessingFargateService`, that would take in the necessary properties required to create a task definition, an SQS queue as well as an ECS/Fargate service and enable autoscaling for the service based on cpu usage and the SQS queue's approximateNumberOfMessagesVisible metric. ## General approach @@ -9,7 +9,7 @@ The new `ecs.QueueProcessingServiceBase`, `ecs.QueueProcessingEc2Service` and `e * QueueProcessingEc2Service * QueueProcessingFargateService -A `QueueProcessingService` will create a task definition with the specified container (on both EC2 and Fargate). An AWS SQS `Queue` will be created and autoscaling of the ECS Service will be dependent on both CPU as well as the SQS queue's `ApproximateNumberOfMessagesVisible` metric. +A `QueueProcessingService` will create a task definition with the specified container (on both EC2 and Fargate). An AWS SQS `Queue` will be created and autoscaling of the ECS Service will be dependent on both CPU as well as the SQS queue's `ApproximateNumberOfMessagesVisible` metric. The `QueueProcessingService` constructs (for EC2 and Fargate) will use the following existing constructs: @@ -24,7 +24,7 @@ Given the above, we should make the following changes to support queue processin 2. Create `QueueProcessingEc2ServiceProps` interface and `QueueProcessingEc2Service` construct 3. Create `QueueProcessingFargateServiceProps` interface and `QueueProcessingFargateService` construct -### Part 1: Create `QueueProcessingServiceBaseProps` interface and `QueueProcessingServiceBase` construct +### Part 1: Create `QueueProcessingServiceBaseProps` interface and `QueueProcessingServiceBase` construct The `QueueProcessingServiceBaseProps` interface will contain common properties used to construct both the QueueProcessingEc2Service and the QueueProcessingFargateService: @@ -93,14 +93,14 @@ export interface QueueProcessingServiceBaseProps { * * Maps a range of metric values to a particular scaling behavior. * https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scaling-simple-step.html - * + * * @default [{ upper: 0, change: -1 },{ lower: 100, change: +1 },{ lower: 500, change: +5 }] */ readonly scalingSteps: autoScaling.ScalingInterval[]; } ``` -### Part 2: Create `QueueProcessingEc2ServiceProps` interface and `QueueProcessingEc2Service` construct +### Part 2: Create `QueueProcessingEc2ServiceProps` interface and `QueueProcessingEc2Service` construct The `QueueProcessingEc2ServiceProps` interface will contain properties to construct the Ec2TaskDefinition, SQSQueue and Ec2Service: @@ -147,12 +147,12 @@ export interface QueueProcessingEc2ServiceProps { An example use case: ```ts // Create the vpc and cluster used by the queue processing service -const vpc = new ec2.Vpc(stack, 'Vpc', { maxAZs: 1 }); +const vpc = new ec2.Vpc(stack, 'Vpc', { maxAzs: 1 }); const cluster = new ecs.Cluster(stack, 'EcsCluster', { vpc }); cluster.addCapacity('DefaultAutoScalingGroup', { instanceType: new ec2.InstanceType('t2.micro') }); -const queue = new sqs.Queue(stack, 'ProcessingQueue', { +const queue = new sqs.Queue(stack, 'ProcessingQueue', { QueueName: 'EcsEventQueue' }); @@ -168,7 +168,7 @@ new QueueProcessingEc2Service(stack, 'QueueProcessingEc2Service', { }); ``` -### Part 3: Create `QueueProcessingFargateServiceProps` interface and `QueueProcessingFargateService` construct +### Part 3: Create `QueueProcessingFargateServiceProps` interface and `QueueProcessingFargateService` construct The `QueueProcessingFargateServiceProps` interface will contain properties to construct the FargateTaskDefinition, SQSQueue and FargateService: @@ -219,9 +219,9 @@ export interface QueueProcessingFargateServiceProps { An example use case: ```ts // Create the vpc and cluster used by the queue processing service -const vpc = new ec2.Vpc(stack, 'Vpc', { maxAZs: 2 }); +const vpc = new ec2.Vpc(stack, 'Vpc', { maxAzs: 2 }); const cluster = new ecs.Cluster(stack, 'FargateCluster', { vpc }); -const queue = new sqs.Queue(stack, 'ProcessingQueue', { +const queue = new sqs.Queue(stack, 'ProcessingQueue', { QueueName: 'FargateEventQueue' }); diff --git a/design/aws-ecs/aws-ecs-scheduled-ecs-task-construct.md b/design/aws-ecs/aws-ecs-scheduled-ecs-task-construct.md index dd6e9b502cd24..770266d2678ae 100644 --- a/design/aws-ecs/aws-ecs-scheduled-ecs-task-construct.md +++ b/design/aws-ecs/aws-ecs-scheduled-ecs-task-construct.md @@ -19,14 +19,14 @@ The new [`ecs.ScheduledEc2Task`] class will include an L3 construct for: * ScheduledEc2Task -A `ScheduledEc2Task` will create a task definition with the specified container. An `Ec2EventRuleTarget` will be created and associated as the target to an `Amazon Cloudwatch Event Rule` (indicating how frequently the task should be run). Based on the `Amazon Cloudwatch Event Rule` schedule, a task will run on the EC2 instances specified in the cluster. +A `ScheduledEc2Task` will create a task definition with the specified container. An `Ec2EventRuleTarget` will be created and associated as the target to an `Amazon Cloudwatch Event Rule` (indicating how frequently the task should be run). Based on the `Amazon Cloudwatch Event Rule` schedule, a task will run on the EC2 instances specified in the cluster. ## Code changes Given the above, we should make the following changes to support scheduled tasks on ECS: 1. Create `ScheduledEc2TaskProps` interface and `ScheduledEc2Task` construct -# Part 1: Create `ScheduledEc2TaskProps` interface and `ScheduledEc2Task` construct +# Part 1: Create `ScheduledEc2TaskProps` interface and `ScheduledEc2Task` construct The `ScheduledEc2TaskProps` interface will contain properties to construct the Ec2TaskDefinition, Ec2EventRuleTarget and EventRule: @@ -55,14 +55,14 @@ export interface ScheduledEc2TaskProps { /** * The CMD value to pass to the container. A string with commands delimited by commas. - * + * * @default none */ readonly command?: string; /** * The minimum number of CPU units to reserve for the container. - * + * * @default none */ readonly cpu?: number; @@ -76,7 +76,7 @@ export interface ScheduledEc2TaskProps { /** * The environment variables to pass to the container. - * + * * @default none */ readonly environment?: { [key: string]: string }; @@ -118,7 +118,7 @@ The `ScheduledEc2Task` construct will use the following existing constructs: An example use case to create a task that is scheduled to run every minute: ```ts // Create the vpc and cluster used by the scheduled task -const vpc = new ec2.Vpc(stack, 'Vpc', { maxAZs: 1 }); +const vpc = new ec2.Vpc(stack, 'Vpc', { maxAzs: 1 }); const cluster = new ecs.Cluster(stack, 'EcsCluster', { vpc }); cluster.addCapacity('DefaultAutoScalingGroup', { instanceType: new ec2.InstanceType('t2.micro') diff --git a/design/aws-ecs/aws-ecs-service-discovery-integration.md b/design/aws-ecs/aws-ecs-service-discovery-integration.md index 96695843d3a48..37b33ecc854a7 100644 --- a/design/aws-ecs/aws-ecs-service-discovery-integration.md +++ b/design/aws-ecs/aws-ecs-service-discovery-integration.md @@ -122,7 +122,7 @@ export interface ServiceDiscoveryOptions { A full example would look like the following: ``` -const vpc = new ec2.Vpc(stack, 'Vpc', { maxAZs: 2 }); +const vpc = new ec2.Vpc(stack, 'Vpc', { maxAzs: 2 }); // Cloud Map Namespace const namespace = new servicediscovery.PrivateDnsNamespace(stack, 'MyNamespace', { diff --git a/packages/@aws-cdk/aws-autoscaling/test/integ.amazonlinux2.ts b/packages/@aws-cdk/aws-autoscaling/test/integ.amazonlinux2.ts index af691e38ab38a..ce54ba662d76b 100644 --- a/packages/@aws-cdk/aws-autoscaling/test/integ.amazonlinux2.ts +++ b/packages/@aws-cdk/aws-autoscaling/test/integ.amazonlinux2.ts @@ -7,7 +7,7 @@ const app = new cdk.App(); const stack = new cdk.Stack(app, 'aws-cdk-autoscaling-integ'); const vpc = new ec2.Vpc(stack, 'VPC', { - maxAZs: 2 + maxAzs: 2 }); new autoscaling.AutoScalingGroup(stack, 'Fleet', { diff --git a/packages/@aws-cdk/aws-autoscaling/test/integ.asg-w-classic-loadbalancer.ts b/packages/@aws-cdk/aws-autoscaling/test/integ.asg-w-classic-loadbalancer.ts index 4eb92ad7b5d9f..424412f93f6ec 100644 --- a/packages/@aws-cdk/aws-autoscaling/test/integ.asg-w-classic-loadbalancer.ts +++ b/packages/@aws-cdk/aws-autoscaling/test/integ.asg-w-classic-loadbalancer.ts @@ -8,7 +8,7 @@ const app = new cdk.App(); const stack = new cdk.Stack(app, 'aws-cdk-asg-integ'); const vpc = new ec2.Vpc(stack, 'VPC', { - maxAZs: 3 + maxAzs: 3 }); const asg = new autoscaling.AutoScalingGroup(stack, 'Fleet', { diff --git a/packages/@aws-cdk/aws-autoscaling/test/integ.asg-w-elbv2.ts b/packages/@aws-cdk/aws-autoscaling/test/integ.asg-w-elbv2.ts index 8c44a0dbd5a32..33ba75a5f7219 100644 --- a/packages/@aws-cdk/aws-autoscaling/test/integ.asg-w-elbv2.ts +++ b/packages/@aws-cdk/aws-autoscaling/test/integ.asg-w-elbv2.ts @@ -8,7 +8,7 @@ const app = new cdk.App(); const stack = new cdk.Stack(app, 'aws-cdk-asg-integ'); const vpc = new ec2.Vpc(stack, 'VPC', { - maxAZs: 2 + maxAzs: 2 }); const asg = new autoscaling.AutoScalingGroup(stack, 'Fleet', { diff --git a/packages/@aws-cdk/aws-autoscaling/test/integ.custom-scaling.ts b/packages/@aws-cdk/aws-autoscaling/test/integ.custom-scaling.ts index 6105a5fac4505..796bbb8b544db 100644 --- a/packages/@aws-cdk/aws-autoscaling/test/integ.custom-scaling.ts +++ b/packages/@aws-cdk/aws-autoscaling/test/integ.custom-scaling.ts @@ -7,7 +7,7 @@ const app = new cdk.App(); const stack = new cdk.Stack(app, 'aws-cdk-autoscaling-integ'); const vpc = new ec2.Vpc(stack, 'VPC', { - maxAZs: 2 + maxAzs: 2 }); const asg = new autoscaling.AutoScalingGroup(stack, 'Fleet', { @@ -30,4 +30,4 @@ asg.scaleOnCpuUtilization('KeepCPUReasonable', { targetUtilizationPercent: 50 }); -app.synth(); \ No newline at end of file +app.synth(); diff --git a/packages/@aws-cdk/aws-autoscaling/test/integ.spot-instances.ts b/packages/@aws-cdk/aws-autoscaling/test/integ.spot-instances.ts index c92a03625b58f..f2b9e9f892526 100644 --- a/packages/@aws-cdk/aws-autoscaling/test/integ.spot-instances.ts +++ b/packages/@aws-cdk/aws-autoscaling/test/integ.spot-instances.ts @@ -7,7 +7,7 @@ const app = new cdk.App(); const stack = new cdk.Stack(app, 'aws-cdk-autoscaling-integ'); const vpc = new ec2.Vpc(stack, 'VPC', { - maxAZs: 2 + maxAzs: 2 }); new autoscaling.AutoScalingGroup(stack, 'Fleet', { diff --git a/packages/@aws-cdk/aws-codebuild/test/integ.project-vpc.ts b/packages/@aws-cdk/aws-codebuild/test/integ.project-vpc.ts index 730cbc33bf0f3..ba5536d03fd13 100644 --- a/packages/@aws-cdk/aws-codebuild/test/integ.project-vpc.ts +++ b/packages/@aws-cdk/aws-codebuild/test/integ.project-vpc.ts @@ -7,7 +7,7 @@ const app = new cdk.App(); const stack = new cdk.Stack(app, 'aws-cdk-codebuild-project-vpc'); const vpc = new ec2.Vpc(stack, 'MyVPC', { - maxAZs: 1, + maxAzs: 1, natGateways: 1, }); const securityGroup = new ec2.SecurityGroup(stack, 'SecurityGroup1', { 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 baccc1f73dbbd..a2c7462c1c392 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 @@ -14,7 +14,7 @@ const app = new cdk.App(); const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-ecs-deploy'); const vpc = new ec2.Vpc(stack, 'VPC', { - maxAZs: 1, + maxAzs: 1, }); const cluster = new ecs.Cluster(stack, "EcsCluster", { vpc, diff --git a/packages/@aws-cdk/aws-ec2/lib/connections.ts b/packages/@aws-cdk/aws-ec2/lib/connections.ts index dc9013a5f0c40..e86fb9abd3a7b 100644 --- a/packages/@aws-cdk/aws-ec2/lib/connections.ts +++ b/packages/@aws-cdk/aws-ec2/lib/connections.ts @@ -181,14 +181,14 @@ export class Connections implements IConnectable { /** * Allow to all IPv4 ranges */ - public allowToAnyIPv4(portRange: Port, description?: string) { + public allowToAnyIpv4(portRange: Port, description?: string) { this.allowTo(Peer.anyIpv4(), portRange, description); } /** * Allow from any IPv4 ranges */ - public allowFromAnyIPv4(portRange: Port, description?: string) { + public allowFromAnyIpv4(portRange: Port, description?: string) { this.allowFrom(Peer.anyIpv4(), portRange, description); } @@ -221,7 +221,7 @@ export class Connections implements IConnectable { if (!this.defaultPort) { throw new Error('Cannot call allowDefaultPortFromAnyIpv4(): this resource has no default port'); } - this.allowFromAnyIPv4(this.defaultPort, description); + this.allowFromAnyIpv4(this.defaultPort, description); } /** diff --git a/packages/@aws-cdk/aws-ec2/lib/vpc.ts b/packages/@aws-cdk/aws-ec2/lib/vpc.ts index 5e9b90931766f..1a9d9b6c2b938 100644 --- a/packages/@aws-cdk/aws-ec2/lib/vpc.ts +++ b/packages/@aws-cdk/aws-ec2/lib/vpc.ts @@ -452,7 +452,7 @@ export interface VpcProps { * * @default 3 */ - readonly maxAZs?: number; + readonly maxAzs?: number; /** * The number of NAT Gateways to create. @@ -798,7 +798,7 @@ export class Vpc extends VpcBase { this.availabilityZones = stack.availabilityZones; - const maxAZs = props.maxAZs !== undefined ? props.maxAZs : 3; + const maxAZs = props.maxAzs !== undefined ? props.maxAzs : 3; this.availabilityZones = this.availabilityZones.slice(0, maxAZs); this.vpcId = this.resource.ref; diff --git a/packages/@aws-cdk/aws-ec2/test/test.connections.ts b/packages/@aws-cdk/aws-ec2/test/test.connections.ts index acc400c463ab3..2b36dd27f64e9 100644 --- a/packages/@aws-cdk/aws-ec2/test/test.connections.ts +++ b/packages/@aws-cdk/aws-ec2/test/test.connections.ts @@ -73,7 +73,7 @@ export = { const connections = new Connections({ securityGroups: [sg1] }); // WHEN - connections.allowFromAnyIPv4(Port.tcp(88)); + connections.allowFromAnyIpv4(Port.tcp(88)); connections.addSecurityGroup(sg2); // THEN diff --git a/packages/@aws-cdk/aws-ec2/test/test.vpc.ts b/packages/@aws-cdk/aws-ec2/test/test.vpc.ts index 76c961ed333a7..93307458b118b 100644 --- a/packages/@aws-cdk/aws-ec2/test/test.vpc.ts +++ b/packages/@aws-cdk/aws-ec2/test/test.vpc.ts @@ -137,7 +137,7 @@ export = { subnetType: SubnetType.ISOLATED, } ], - maxAZs: 3 + maxAzs: 3 }); expect(stack).to(countResources("AWS::EC2::Subnet", 6)); test.done(); @@ -164,7 +164,7 @@ export = { subnetType: SubnetType.PRIVATE, } ], - maxAZs: 3 + maxAzs: 3 }); for (let i = 0; i < 3; i++) { expect(stack).to(haveResource("AWS::EC2::Subnet", { @@ -205,7 +205,7 @@ export = { subnetType: SubnetType.ISOLATED, } ], - maxAZs: 3 + maxAzs: 3 }); expect(stack).to(countResources("AWS::EC2::InternetGateway", 1)); expect(stack).to(countResources("AWS::EC2::NatGateway", zones)); @@ -244,7 +244,7 @@ export = { subnetType: SubnetType.ISOLATED, } ], - maxAZs: 3 + maxAzs: 3 }); expect(stack).to(countResources("AWS::EC2::InternetGateway", 1)); expect(stack).to(countResources("AWS::EC2::NatGateway", 2)); @@ -272,7 +272,7 @@ export = { "with public subnets MapPublicIpOnLaunch is true"(test: Test) { const stack = getTestStack(); new Vpc(stack, 'VPC', { - maxAZs: 1, + maxAzs: 1, subnetConfiguration: [ { cidrMask: 24, @@ -309,7 +309,7 @@ export = { "with maxAZs set to 2"(test: Test) { const stack = getTestStack(); - new Vpc(stack, 'VPC', { maxAZs: 2 }); + new Vpc(stack, 'VPC', { maxAzs: 2 }); expect(stack).to(countResources("AWS::EC2::Subnet", 4)); expect(stack).to(countResources("AWS::EC2::Route", 4)); for (let i = 0; i < 4; i++) { @@ -687,7 +687,7 @@ export = { // GIVEN const stack = getTestStack(); const vpc = new Vpc(stack, 'VpcNetwork', { - maxAZs: 1, + maxAzs: 1, subnetConfiguration: [ {name: 'app', subnetType: SubnetType.PRIVATE }, {name: 'db', subnetType: SubnetType.PRIVATE }, diff --git a/packages/@aws-cdk/aws-ecs-patterns/test/ec2/integ.scheduled-ecs-task.lit.ts b/packages/@aws-cdk/aws-ecs-patterns/test/ec2/integ.scheduled-ecs-task.lit.ts index ab5c7ac1121ee..41b11d347fd9c 100644 --- a/packages/@aws-cdk/aws-ecs-patterns/test/ec2/integ.scheduled-ecs-task.lit.ts +++ b/packages/@aws-cdk/aws-ecs-patterns/test/ec2/integ.scheduled-ecs-task.lit.ts @@ -11,7 +11,7 @@ class EventStack extends cdk.Stack { constructor(scope: cdk.App, id: string) { super(scope, id); - const vpc = new ec2.Vpc(this, 'Vpc', { maxAZs: 1 }); + const vpc = new ec2.Vpc(this, 'Vpc', { maxAzs: 1 }); const cluster = new ecs.Cluster(this, 'EcsCluster', { vpc }); cluster.addCapacity('DefaultAutoScalingGroup', { diff --git a/packages/@aws-cdk/aws-ecs-patterns/test/ec2/test.scheduled-ecs-task.ts b/packages/@aws-cdk/aws-ecs-patterns/test/ec2/test.scheduled-ecs-task.ts index 9b7e30622e5b8..9581b8c7fcca0 100644 --- a/packages/@aws-cdk/aws-ecs-patterns/test/ec2/test.scheduled-ecs-task.ts +++ b/packages/@aws-cdk/aws-ecs-patterns/test/ec2/test.scheduled-ecs-task.ts @@ -10,7 +10,7 @@ export = { "Can create a scheduled Ec2 Task - with only required props"(test: Test) { // GIVEN const stack = new cdk.Stack(); - const vpc = new ec2.Vpc(stack, 'Vpc', { maxAZs: 1 }); + const vpc = new ec2.Vpc(stack, 'Vpc', { maxAzs: 1 }); const cluster = new ecs.Cluster(stack, 'EcsCluster', { vpc }); cluster.addCapacity('DefaultAutoScalingGroup', { instanceType: new ec2.InstanceType('t2.micro') @@ -73,7 +73,7 @@ export = { "Can create a scheduled Ec2 Task - with optional props"(test: Test) { // GIVEN const stack = new cdk.Stack(); - const vpc = new ec2.Vpc(stack, 'Vpc', { maxAZs: 1 }); + const vpc = new ec2.Vpc(stack, 'Vpc', { maxAzs: 1 }); const cluster = new ecs.Cluster(stack, 'EcsCluster', { vpc }); cluster.addCapacity('DefaultAutoScalingGroup', { instanceType: new ec2.InstanceType('t2.micro') @@ -150,7 +150,7 @@ export = { "Scheduled Ec2 Task - with MemoryReservation defined"(test: Test) { // GIVEN const stack = new cdk.Stack(); - const vpc = new ec2.Vpc(stack, 'Vpc', { maxAZs: 1 }); + const vpc = new ec2.Vpc(stack, 'Vpc', { maxAzs: 1 }); const cluster = new ecs.Cluster(stack, 'EcsCluster', { vpc }); cluster.addCapacity('DefaultAutoScalingGroup', { instanceType: new ec2.InstanceType('t2.micro') @@ -198,7 +198,7 @@ export = { "Scheduled Ec2 Task - with Command defined"(test: Test) { // GIVEN const stack = new cdk.Stack(); - const vpc = new ec2.Vpc(stack, 'Vpc', { maxAZs: 1 }); + const vpc = new ec2.Vpc(stack, 'Vpc', { maxAzs: 1 }); const cluster = new ecs.Cluster(stack, 'EcsCluster', { vpc }); cluster.addCapacity('DefaultAutoScalingGroup', { instanceType: new ec2.InstanceType('t2.micro') diff --git a/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.asset-image.ts b/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.asset-image.ts index 19d7eec2e63b8..7a391c019303f 100644 --- a/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.asset-image.ts +++ b/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.asset-image.ts @@ -6,7 +6,7 @@ import ecsPatterns = require('../../lib'); const app = new cdk.App(); const stack = new cdk.Stack(app, 'aws-ecs-integ'); -const vpc = new ec2.Vpc(stack, 'Vpc', { maxAZs: 2 }); +const vpc = new ec2.Vpc(stack, 'Vpc', { maxAzs: 2 }); const cluster = new ecs.Cluster(stack, 'Cluster', { vpc }); diff --git a/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.executionrole.ts b/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.executionrole.ts index f445ed32b8e30..ce19c117b8504 100644 --- a/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.executionrole.ts +++ b/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.executionrole.ts @@ -7,7 +7,7 @@ import ecsPatterns = require('../../lib'); const app = new cdk.App(); const stack = new cdk.Stack(app, 'aws-ecs-integ'); -const vpc = new ec2.Vpc(stack, 'Vpc', { maxAZs: 2 }); +const vpc = new ec2.Vpc(stack, 'Vpc', { maxAzs: 2 }); const cluster = new ecs.Cluster(stack, 'FargateCluster', { vpc }); diff --git a/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.l3.ts b/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.l3.ts index 3f6a7861c7852..dc098d3d7033c 100644 --- a/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.l3.ts +++ b/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.l3.ts @@ -6,7 +6,7 @@ import ecsPatterns = require('../../lib'); const app = new cdk.App(); const stack = new cdk.Stack(app, 'aws-ecs-integ'); -const vpc = new ec2.Vpc(stack, 'Vpc', { maxAZs: 2 }); +const vpc = new ec2.Vpc(stack, 'Vpc', { maxAzs: 2 }); const cluster = new ecs.Cluster(stack, 'FargateCluster', { vpc }); diff --git a/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.scheduled-fargate-task.lit.ts b/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.scheduled-fargate-task.lit.ts index 0bc9e0a504488..ee32ac5dfd6d4 100644 --- a/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.scheduled-fargate-task.lit.ts +++ b/packages/@aws-cdk/aws-ecs-patterns/test/fargate/integ.scheduled-fargate-task.lit.ts @@ -12,7 +12,7 @@ class EventStack extends cdk.Stack { constructor(scope: cdk.App, id: string) { super(scope, id); - const vpc = new ec2.Vpc(this, 'Vpc', { maxAZs: 1 }); + const vpc = new ec2.Vpc(this, 'Vpc', { maxAzs: 1 }); const cluster = new ecs.Cluster(this, 'FargateCluster', { vpc }); // Create the scheduled task diff --git a/packages/@aws-cdk/aws-ecs-patterns/test/fargate/test.scheduled-fargate-task.ts b/packages/@aws-cdk/aws-ecs-patterns/test/fargate/test.scheduled-fargate-task.ts index 68816fe91ca6b..fcbafd44b1233 100644 --- a/packages/@aws-cdk/aws-ecs-patterns/test/fargate/test.scheduled-fargate-task.ts +++ b/packages/@aws-cdk/aws-ecs-patterns/test/fargate/test.scheduled-fargate-task.ts @@ -10,7 +10,7 @@ export = { "Can create a scheduled Fargate Task - with only required props"(test: Test) { // GIVEN const stack = new cdk.Stack(); - const vpc = new ec2.Vpc(stack, 'Vpc', { maxAZs: 1 }); + const vpc = new ec2.Vpc(stack, 'Vpc', { maxAzs: 1 }); const cluster = new ecs.Cluster(stack, 'EcsCluster', { vpc }); new ScheduledFargateTask(stack, 'ScheduledFargateTask', { @@ -69,7 +69,7 @@ export = { "Can create a scheduled Fargate Task - with optional props"(test: Test) { // GIVEN const stack = new cdk.Stack(); - const vpc = new ec2.Vpc(stack, 'Vpc', { maxAZs: 1 }); + const vpc = new ec2.Vpc(stack, 'Vpc', { maxAzs: 1 }); const cluster = new ecs.Cluster(stack, 'EcsCluster', { vpc }); new ScheduledFargateTask(stack, 'ScheduledFargateTask', { @@ -141,7 +141,7 @@ export = { "Scheduled Fargate Task - with MemoryReservation defined"(test: Test) { // GIVEN const stack = new cdk.Stack(); - const vpc = new ec2.Vpc(stack, 'Vpc', { maxAZs: 1 }); + const vpc = new ec2.Vpc(stack, 'Vpc', { maxAzs: 1 }); const cluster = new ecs.Cluster(stack, 'EcsCluster', { vpc }); new ScheduledFargateTask(stack, 'ScheduledFargateTask', { @@ -184,7 +184,7 @@ export = { "Scheduled Fargate Task - with Command defined"(test: Test) { // GIVEN const stack = new cdk.Stack(); - const vpc = new ec2.Vpc(stack, 'Vpc', { maxAZs: 1 }); + const vpc = new ec2.Vpc(stack, 'Vpc', { maxAzs: 1 }); const cluster = new ecs.Cluster(stack, 'EcsCluster', { vpc }); new ScheduledFargateTask(stack, 'ScheduledFargateTask', { diff --git a/packages/@aws-cdk/aws-ecs/test/ec2/integ.lb-awsvpc-nw.ts b/packages/@aws-cdk/aws-ecs/test/ec2/integ.lb-awsvpc-nw.ts index 9007793708199..680d03bb6a3b7 100644 --- a/packages/@aws-cdk/aws-ecs/test/ec2/integ.lb-awsvpc-nw.ts +++ b/packages/@aws-cdk/aws-ecs/test/ec2/integ.lb-awsvpc-nw.ts @@ -7,7 +7,7 @@ import { NetworkMode } from '../../lib'; const app = new cdk.App(); const stack = new cdk.Stack(app, 'aws-ecs-integ'); -const vpc = new ec2.Vpc(stack, 'Vpc', { maxAZs: 2 }); +const vpc = new ec2.Vpc(stack, 'Vpc', { maxAzs: 2 }); const cluster = new ecs.Cluster(stack, 'EcsCluster', { vpc }); cluster.addCapacity('DefaultAutoScalingGroup', { diff --git a/packages/@aws-cdk/aws-ecs/test/ec2/integ.lb-bridge-nw.ts b/packages/@aws-cdk/aws-ecs/test/ec2/integ.lb-bridge-nw.ts index c58e7c68ff129..e2ed99697c146 100644 --- a/packages/@aws-cdk/aws-ecs/test/ec2/integ.lb-bridge-nw.ts +++ b/packages/@aws-cdk/aws-ecs/test/ec2/integ.lb-bridge-nw.ts @@ -7,7 +7,7 @@ import ecs = require('../../lib'); const app = new cdk.App(); const stack = new cdk.Stack(app, 'aws-ecs-integ-ecs'); -const vpc = new ec2.Vpc(stack, 'Vpc', { maxAZs: 2 }); +const vpc = new ec2.Vpc(stack, 'Vpc', { maxAzs: 2 }); const cluster = new ecs.Cluster(stack, 'EcsCluster', { vpc }); cluster.addCapacity('DefaultAutoScalingGroup', { diff --git a/packages/@aws-cdk/aws-ecs/test/ec2/integ.sd-awsvpc-nw.ts b/packages/@aws-cdk/aws-ecs/test/ec2/integ.sd-awsvpc-nw.ts index 0bec8ec26c1ff..e0c38649ae6de 100644 --- a/packages/@aws-cdk/aws-ecs/test/ec2/integ.sd-awsvpc-nw.ts +++ b/packages/@aws-cdk/aws-ecs/test/ec2/integ.sd-awsvpc-nw.ts @@ -6,7 +6,7 @@ import { NetworkMode } from '../../lib'; const app = new cdk.App(); const stack = new cdk.Stack(app, 'aws-ecs-integ-ecs'); -const vpc = new ec2.Vpc(stack, 'Vpc', { maxAZs: 2 }); +const vpc = new ec2.Vpc(stack, 'Vpc', { maxAzs: 2 }); const cluster = new ecs.Cluster(stack, 'EcsCluster', { vpc }); diff --git a/packages/@aws-cdk/aws-ecs/test/ec2/integ.sd-bridge-nw.ts b/packages/@aws-cdk/aws-ecs/test/ec2/integ.sd-bridge-nw.ts index d22afcfe27509..19b250b8e52cd 100644 --- a/packages/@aws-cdk/aws-ecs/test/ec2/integ.sd-bridge-nw.ts +++ b/packages/@aws-cdk/aws-ecs/test/ec2/integ.sd-bridge-nw.ts @@ -5,7 +5,7 @@ import ecs = require('../../lib'); const app = new cdk.App(); const stack = new cdk.Stack(app, 'aws-ecs-integ-ecs'); -const vpc = new ec2.Vpc(stack, 'Vpc', { maxAZs: 2 }); +const vpc = new ec2.Vpc(stack, 'Vpc', { maxAzs: 2 }); const cluster = new ecs.Cluster(stack, 'EcsCluster', { vpc }); diff --git a/packages/@aws-cdk/aws-ecs/test/fargate/integ.lb-awsvpc-nw.ts b/packages/@aws-cdk/aws-ecs/test/fargate/integ.lb-awsvpc-nw.ts index 8d7852e02acd2..0a73f5f77571c 100644 --- a/packages/@aws-cdk/aws-ecs/test/fargate/integ.lb-awsvpc-nw.ts +++ b/packages/@aws-cdk/aws-ecs/test/fargate/integ.lb-awsvpc-nw.ts @@ -6,7 +6,7 @@ import ecs = require('../../lib'); const app = new cdk.App(); const stack = new cdk.Stack(app, 'aws-ecs-integ'); -const vpc = new ec2.Vpc(stack, 'Vpc', { maxAZs: 2 }); +const vpc = new ec2.Vpc(stack, 'Vpc', { maxAzs: 2 }); const cluster = new ecs.Cluster(stack, 'FargateCluster', { vpc }); diff --git a/packages/@aws-cdk/aws-eks/lib/cluster.ts b/packages/@aws-cdk/aws-eks/lib/cluster.ts index 2e57f99f33cab..e2a37f2cda275 100644 --- a/packages/@aws-cdk/aws-eks/lib/cluster.ts +++ b/packages/@aws-cdk/aws-eks/lib/cluster.ts @@ -304,9 +304,9 @@ export class Cluster extends Resource implements ICluster { autoScalingGroup.connections.allowTo(this, ec2.Port.tcp(443)); // Allow all node outbound traffic - autoScalingGroup.connections.allowToAnyIPv4(ec2.Port.allTcp()); - autoScalingGroup.connections.allowToAnyIPv4(ec2.Port.allUdp()); - autoScalingGroup.connections.allowToAnyIPv4(ec2.Port.allIcmp()); + autoScalingGroup.connections.allowToAnyIpv4(ec2.Port.allTcp()); + autoScalingGroup.connections.allowToAnyIpv4(ec2.Port.allUdp()); + autoScalingGroup.connections.allowToAnyIpv4(ec2.Port.allIcmp()); autoScalingGroup.addUserData( 'set -o xtrace', diff --git a/packages/@aws-cdk/aws-elasticloadbalancing/test/integ.elb.ts b/packages/@aws-cdk/aws-elasticloadbalancing/test/integ.elb.ts index 8d532b5ec5737..23c6d12d6ce31 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancing/test/integ.elb.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancing/test/integ.elb.ts @@ -7,7 +7,7 @@ const app = new cdk.App(); const stack = new cdk.Stack(app, 'aws-cdk-elb-integ'); const vpc = new ec2.Vpc(stack, 'VPC', { - maxAZs: 1 + maxAzs: 1 }); new elb.LoadBalancer(stack, 'LB', { 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 6a699030eba56..905936fe0109f 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 @@ -237,7 +237,7 @@ export class ApplicationLoadBalancer extends BaseLoadBalancer implements IApplic * * @default Sum over 5 minutes */ - public metricIPv6ProcessedBytes(props?: cloudwatch.MetricOptions) { + public metricIpv6ProcessedBytes(props?: cloudwatch.MetricOptions) { return this.metric('IPv6ProcessedBytes', { statistic: 'Sum', ...props @@ -249,7 +249,7 @@ export class ApplicationLoadBalancer extends BaseLoadBalancer implements IApplic * * @default Sum over 5 minutes */ - public metricIPv6RequestCount(props?: cloudwatch.MetricOptions) { + public metricIpv6RequestCount(props?: cloudwatch.MetricOptions) { return this.metric('IPv6RequestCount', { statistic: 'Sum', ...props 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 4d095af8b4da5..ab9b327dd1f39 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 @@ -183,7 +183,7 @@ export class ApplicationTargetGroup extends TargetGroupBase implements IApplicat * * @default Sum over 5 minutes */ - public metricIPv6RequestCount(props?: cloudwatch.MetricOptions) { + public metricIpv6RequestCount(props?: cloudwatch.MetricOptions) { return this.metric('IPv6RequestCount', { statistic: 'Sum', ...props diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/test.listener.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/test.listener.ts index 0f8c18777fd22..33f7cccf089d9 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/test.listener.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/test.listener.ts @@ -419,7 +419,7 @@ export = { // WHEN const metrics = []; metrics.push(group.metricHttpCodeTarget(elbv2.HttpCodeTarget.TARGET_3XX_COUNT)); - metrics.push(group.metricIPv6RequestCount()); + metrics.push(group.metricIpv6RequestCount()); metrics.push(group.metricUnhealthyHostCount()); metrics.push(group.metricUnhealthyHostCount()); metrics.push(group.metricRequestCount()); diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/test.load-balancer.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/test.load-balancer.ts index 5e448b233b53d..267ead4f78397 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/test.load-balancer.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/test.load-balancer.ts @@ -230,8 +230,8 @@ export = { metrics.push(lb.metricHttpFixedResponseCount()); metrics.push(lb.metricHttpRedirectCount()); metrics.push(lb.metricHttpRedirectUrlLimitExceededCount()); - metrics.push(lb.metricIPv6ProcessedBytes()); - metrics.push(lb.metricIPv6RequestCount()); + metrics.push(lb.metricIpv6ProcessedBytes()); + metrics.push(lb.metricIpv6RequestCount()); metrics.push(lb.metricNewConnectionCount()); metrics.push(lb.metricProcessedBytes()); metrics.push(lb.metricRejectedConnectionCount()); diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/test.security-groups.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/test.security-groups.ts index 46c11e929f0d7..241821717ff1c 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/test.security-groups.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/test.security-groups.ts @@ -248,7 +248,7 @@ class TestFixture { this.app = new cdk.App(); this.stack = new cdk.Stack(this.app, 'Stack'); this.vpc = new ec2.Vpc(this.stack, 'VPC', { - maxAZs: 2 + maxAzs: 2 }); this.lb = new elbv2.ApplicationLoadBalancer(this.stack, 'LB', { vpc: this.vpc }); diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.alb.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.alb.ts index e82129c1cf749..7a7e6e71cc901 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.alb.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.alb.ts @@ -7,7 +7,7 @@ const app = new cdk.App(); const stack = new cdk.Stack(app, 'aws-cdk-elbv2-integ'); const vpc = new ec2.Vpc(stack, 'VPC', { - maxAZs: 2 + maxAzs: 2 }); const lb = new elbv2.ApplicationLoadBalancer(stack, 'LB', { diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb.ts index 9a4342f08cef7..335fc1465374b 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.nlb.ts @@ -7,7 +7,7 @@ const app = new cdk.App(); const stack = new cdk.Stack(app, 'aws-cdk-elbv2-integ'); const vpc = new ec2.Vpc(stack, 'VPC', { - maxAZs: 2 + maxAzs: 2 }); const lb = new elbv2.NetworkLoadBalancer(stack, 'LB', { diff --git a/packages/@aws-cdk/aws-events-targets/test/ecs/event-rule-target.test.ts b/packages/@aws-cdk/aws-events-targets/test/ecs/event-rule-target.test.ts index f0feb5a4d83fa..efb27dae2a41e 100644 --- a/packages/@aws-cdk/aws-events-targets/test/ecs/event-rule-target.test.ts +++ b/packages/@aws-cdk/aws-events-targets/test/ecs/event-rule-target.test.ts @@ -8,7 +8,7 @@ import targets = require('../../lib'); test("Can use EC2 taskdef as EventRule target", () => { // GIVEN const stack = new cdk.Stack(); - const vpc = new ec2.Vpc(stack, 'Vpc', { maxAZs: 1 }); + const vpc = new ec2.Vpc(stack, 'Vpc', { maxAzs: 1 }); const cluster = new ecs.Cluster(stack, 'EcsCluster', { vpc }); cluster.addCapacity('DefaultAutoScalingGroup', { instanceType: new ec2.InstanceType('t2.micro') @@ -60,7 +60,7 @@ test("Can use EC2 taskdef as EventRule target", () => { test("Can use Fargate taskdef as EventRule target", () => { // GIVEN const stack = new cdk.Stack(); - const vpc = new ec2.Vpc(stack, 'Vpc', { maxAZs: 1 }); + const vpc = new ec2.Vpc(stack, 'Vpc', { maxAzs: 1 }); const cluster = new ecs.Cluster(stack, 'EcsCluster', { vpc }); const taskDefinition = new ecs.FargateTaskDefinition(stack, 'TaskDef'); diff --git a/packages/@aws-cdk/aws-events-targets/test/ecs/integ.event-ec2-task.lit.ts b/packages/@aws-cdk/aws-events-targets/test/ecs/integ.event-ec2-task.lit.ts index c2889ab61308d..c67a17543b0b6 100644 --- a/packages/@aws-cdk/aws-events-targets/test/ecs/integ.event-ec2-task.lit.ts +++ b/packages/@aws-cdk/aws-events-targets/test/ecs/integ.event-ec2-task.lit.ts @@ -12,7 +12,7 @@ class EventStack extends cdk.Stack { constructor(scope: cdk.App, id: string) { super(scope, id); - const vpc = new ec2.Vpc(this, 'Vpc', { maxAZs: 1 }); + const vpc = new ec2.Vpc(this, 'Vpc', { maxAzs: 1 }); const cluster = new ecs.Cluster(this, 'EcsCluster', { vpc }); cluster.addCapacity('DefaultAutoScalingGroup', { diff --git a/packages/@aws-cdk/aws-events-targets/test/ecs/integ.event-fargate-task.ts b/packages/@aws-cdk/aws-events-targets/test/ecs/integ.event-fargate-task.ts index 81caece3ee424..bb2bbdda4bc33 100644 --- a/packages/@aws-cdk/aws-events-targets/test/ecs/integ.event-fargate-task.ts +++ b/packages/@aws-cdk/aws-events-targets/test/ecs/integ.event-fargate-task.ts @@ -12,7 +12,7 @@ class EventStack extends cdk.Stack { constructor(scope: cdk.App, id: string) { super(scope, id); - const vpc = new ec2.Vpc(this, 'Vpc', { maxAZs: 1 }); + const vpc = new ec2.Vpc(this, 'Vpc', { maxAzs: 1 }); const cluster = new ecs.Cluster(this, 'EcsCluster', { vpc }); diff --git a/packages/@aws-cdk/aws-lambda/test/integ.vpc-lambda.ts b/packages/@aws-cdk/aws-lambda/test/integ.vpc-lambda.ts index f377b3429cb68..819e0b34be5bb 100644 --- a/packages/@aws-cdk/aws-lambda/test/integ.vpc-lambda.ts +++ b/packages/@aws-cdk/aws-lambda/test/integ.vpc-lambda.ts @@ -5,7 +5,7 @@ import lambda = require('../lib'); const app = new cdk.App(); const stack = new cdk.Stack(app, 'aws-cdk-vpc-lambda'); -const vpc = new ec2.Vpc(stack, 'VPC', { maxAZs: 2 }); +const vpc = new ec2.Vpc(stack, 'VPC', { maxAzs: 2 }); new lambda.Function(stack, 'MyLambda', { code: new lambda.InlineCode('def main(event, context): pass'), diff --git a/packages/@aws-cdk/aws-lambda/test/test.vpc-lambda.ts b/packages/@aws-cdk/aws-lambda/test/test.vpc-lambda.ts index ec2be4d31b6fb..952049dc46911 100644 --- a/packages/@aws-cdk/aws-lambda/test/test.vpc-lambda.ts +++ b/packages/@aws-cdk/aws-lambda/test/test.vpc-lambda.ts @@ -133,7 +133,7 @@ export = { // WHEN test.throws(() => { - lambdaFn.connections.allowToAnyIPv4(ec2.Port.allTcp(), 'Reach for the world Lambda!'); + lambdaFn.connections.allowToAnyIpv4(ec2.Port.allTcp(), 'Reach for the world Lambda!'); }); test.done(); diff --git a/packages/@aws-cdk/aws-rds/test/integ.cluster.ts b/packages/@aws-cdk/aws-rds/test/integ.cluster.ts index a2fd8e0c378cb..f35b07bc86d68 100644 --- a/packages/@aws-cdk/aws-rds/test/integ.cluster.ts +++ b/packages/@aws-cdk/aws-rds/test/integ.cluster.ts @@ -8,7 +8,7 @@ import { ClusterParameterGroup } from '../lib/parameter-group'; const app = new cdk.App(); const stack = new cdk.Stack(app, 'aws-cdk-rds-integ'); -const vpc = new ec2.Vpc(stack, 'VPC', { maxAZs: 2 }); +const vpc = new ec2.Vpc(stack, 'VPC', { maxAzs: 2 }); const params = new ClusterParameterGroup(stack, 'Params', { family: 'aurora5.6', diff --git a/packages/@aws-cdk/aws-rds/test/integ.instance.lit.ts b/packages/@aws-cdk/aws-rds/test/integ.instance.lit.ts index 2c7158fc871e9..2c9e245431719 100644 --- a/packages/@aws-cdk/aws-rds/test/integ.instance.lit.ts +++ b/packages/@aws-cdk/aws-rds/test/integ.instance.lit.ts @@ -12,7 +12,7 @@ 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', { maxAZs: 2 }); + const vpc = new ec2.Vpc(this, 'VPC', { maxAzs: 2 }); /// !show // Set open cursors with parameter group diff --git a/packages/@aws-cdk/aws-route53-targets/test/integ.alb-alias-target.ts b/packages/@aws-cdk/aws-route53-targets/test/integ.alb-alias-target.ts index 09e3d8deb080c..eaa8b2a0dcfd5 100644 --- a/packages/@aws-cdk/aws-route53-targets/test/integ.alb-alias-target.ts +++ b/packages/@aws-cdk/aws-route53-targets/test/integ.alb-alias-target.ts @@ -9,7 +9,7 @@ const app = new cdk.App(); const stack = new cdk.Stack(app, 'aws-cdk-elbv2-integ'); const vpc = new ec2.Vpc(stack, 'VPC', { - maxAZs: 2 + maxAzs: 2 }); const lb = new elbv2.ApplicationLoadBalancer(stack, 'LB', { diff --git a/packages/@aws-cdk/aws-route53-targets/test/load-balancer-target.test.ts b/packages/@aws-cdk/aws-route53-targets/test/load-balancer-target.test.ts index 703a8006faf4a..ef9a2ee35e8a9 100644 --- a/packages/@aws-cdk/aws-route53-targets/test/load-balancer-target.test.ts +++ b/packages/@aws-cdk/aws-route53-targets/test/load-balancer-target.test.ts @@ -9,7 +9,7 @@ test('use ALB as record target', () => { // GIVEN const stack = new Stack(); const vpc = new ec2.Vpc(stack, 'VPC', { - maxAZs: 2 + maxAzs: 2 }); const lb = new elbv2.ApplicationLoadBalancer(stack, 'LB', { vpc, diff --git a/packages/@aws-cdk/aws-route53/test/integ.route53.ts b/packages/@aws-cdk/aws-route53/test/integ.route53.ts index a334d1522fe7d..7da5ce156b22e 100644 --- a/packages/@aws-cdk/aws-route53/test/integ.route53.ts +++ b/packages/@aws-cdk/aws-route53/test/integ.route53.ts @@ -6,7 +6,7 @@ const app = new cdk.App(); const stack = new cdk.Stack(app, 'aws-cdk-route53-integ'); -const vpc = new ec2.Vpc(stack, 'VPC', { maxAZs: 1 }); +const vpc = new ec2.Vpc(stack, 'VPC', { maxAzs: 1 }); const privateZone = new PrivateHostedZone(stack, 'PrivateZone', { zoneName: 'cdk.local', vpc diff --git a/packages/@aws-cdk/aws-servicediscovery/test/integ.service-with-private-dns-namespace.lit.ts b/packages/@aws-cdk/aws-servicediscovery/test/integ.service-with-private-dns-namespace.lit.ts index 8bc0ef8bdf239..4509c963c4ceb 100644 --- a/packages/@aws-cdk/aws-servicediscovery/test/integ.service-with-private-dns-namespace.lit.ts +++ b/packages/@aws-cdk/aws-servicediscovery/test/integ.service-with-private-dns-namespace.lit.ts @@ -6,7 +6,7 @@ import servicediscovery = require('../lib'); const app = new cdk.App(); const stack = new cdk.Stack(app, 'aws-servicediscovery-integ'); -const vpc = new ec2.Vpc(stack, 'Vpc', { maxAZs: 2 }); +const vpc = new ec2.Vpc(stack, 'Vpc', { maxAzs: 2 }); const namespace = new servicediscovery.PrivateDnsNamespace(stack, 'Namespace', { name: 'boobar.com', diff --git a/packages/@aws-cdk/core/lib/cfn-fn.ts b/packages/@aws-cdk/core/lib/cfn-fn.ts index fc61456a7050c..04b084084fefc 100644 --- a/packages/@aws-cdk/core/lib/cfn-fn.ts +++ b/packages/@aws-cdk/core/lib/cfn-fn.ts @@ -132,7 +132,7 @@ export class Fn { * equivalent to specifying AWS::Region. * @returns a token represented as a string array */ - public static getAZs(region?: string): string[] { + public static getAzs(region?: string): string[] { return Token.asList(new FnGetAZs(region)); } diff --git a/packages/@aws-cdk/core/lib/stack.ts b/packages/@aws-cdk/core/lib/stack.ts index 1ed304ab23af8..245dd56956a1f 100644 --- a/packages/@aws-cdk/core/lib/stack.ts +++ b/packages/@aws-cdk/core/lib/stack.ts @@ -397,8 +397,8 @@ export class Stack extends Construct implements ITaggable { const agnostic = Token.isUnresolved(this.account) || Token.isUnresolved(this.region); if (agnostic) { return this.node.tryGetContext(cxapi.AVAILABILITY_ZONE_FALLBACK_CONTEXT_KEY) || [ - Fn.select(0, Fn.getAZs()), - Fn.select(1, Fn.getAZs()) + Fn.select(0, Fn.getAzs()), + Fn.select(1, Fn.getAzs()) ]; } diff --git a/packages/decdk/examples/ecs.json b/packages/decdk/examples/ecs.json index ea85e12144140..86d63cbcf8489 100644 --- a/packages/decdk/examples/ecs.json +++ b/packages/decdk/examples/ecs.json @@ -4,7 +4,7 @@ "VPC": { "Type": "@aws-cdk/aws-ec2.Vpc", "Properties": { - "maxAZs": 1 + "maxAzs": 1 } }, "Cluster": { diff --git a/packages/decdk/package.json b/packages/decdk/package.json index 9eca64ffc6b57..11df3c1a64383 100644 --- a/packages/decdk/package.json +++ b/packages/decdk/package.json @@ -162,4 +162,4 @@ "engines": { "node": ">= 8.10.0" } -} +} \ No newline at end of file