From a3c9b23ff3e2a9806180919aa2c9eaa89aa19ce5 Mon Sep 17 00:00:00 2001 From: Piradeep Kandasamy Date: Tue, 9 Jul 2019 14:13:40 -0700 Subject: [PATCH] Update VPCProps to us maxAzs --- typescript/ecs/cluster/index.ts | 2 +- typescript/ecs/ecs-load-balanced-service/index.ts | 2 +- typescript/ecs/ecs-service-with-advanced-alb-config/index.ts | 2 +- typescript/ecs/ecs-service-with-logging/index.ts | 2 +- typescript/ecs/ecs-service-with-task-networking/index.ts | 2 +- typescript/ecs/ecs-service-with-task-placement/index.ts | 2 +- typescript/ecs/fargate-load-balanced-service/index.ts | 2 +- typescript/ecs/fargate-service-with-auto-scaling/index.ts | 2 +- typescript/ecs/fargate-service-with-local-image/index.ts | 2 +- typescript/ecs/fargate-service-with-logging/index.ts | 2 +- typescript/resource-overrides/index.ts | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/typescript/ecs/cluster/index.ts b/typescript/ecs/cluster/index.ts index 80c77e0dc..ce1d1d3bd 100644 --- a/typescript/ecs/cluster/index.ts +++ b/typescript/ecs/cluster/index.ts @@ -7,7 +7,7 @@ class ECSCluster extends cdk.Stack { constructor(scope: cdk.App, id: string, props?: cdk.StackProps) { super(scope, id, props); - const vpc = new ec2.Vpc(this, 'MyVpc', { maxAZs: 2 }); + const vpc = new ec2.Vpc(this, 'MyVpc', { maxAzs: 2 }); const asg = new autoscaling.AutoScalingGroup(this, 'MyFleet', { instanceType: ec2.InstanceType.of(ec2.InstanceClass.T2, ec2.InstanceSize.XLARGE), diff --git a/typescript/ecs/ecs-load-balanced-service/index.ts b/typescript/ecs/ecs-load-balanced-service/index.ts index 36062372d..d2fa15a2e 100644 --- a/typescript/ecs/ecs-load-balanced-service/index.ts +++ b/typescript/ecs/ecs-load-balanced-service/index.ts @@ -11,7 +11,7 @@ class BonjourECS extends cdk.Stack { // a separate stack and import it here. We then have two stacks to // deploy, but VPC creation is slow so we'll only have to do that once // and can iterate quickly on consuming stacks. Not doing that for now. - const vpc = new ec2.Vpc(this, 'MyVpc', { maxAZs: 2 }); + const vpc = new ec2.Vpc(this, 'MyVpc', { maxAzs: 2 }); const cluster = new ecs.Cluster(this, 'Ec2Cluster', { vpc }); cluster.addCapacity('DefaultAutoScalingGroup', { instanceType: ec2.InstanceType.of(ec2.InstanceClass.T2, ec2.InstanceSize.MICRO) diff --git a/typescript/ecs/ecs-service-with-advanced-alb-config/index.ts b/typescript/ecs/ecs-service-with-advanced-alb-config/index.ts index 0a13bdbcf..df64b8148 100644 --- a/typescript/ecs/ecs-service-with-advanced-alb-config/index.ts +++ b/typescript/ecs/ecs-service-with-advanced-alb-config/index.ts @@ -7,7 +7,7 @@ const app = new cdk.App(); const stack = new cdk.Stack(app, 'aws-ecs-integ-ecs'); // Create a cluster -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/typescript/ecs/ecs-service-with-logging/index.ts b/typescript/ecs/ecs-service-with-logging/index.ts index 4cdb6a291..63a23a774 100644 --- a/typescript/ecs/ecs-service-with-logging/index.ts +++ b/typescript/ecs/ecs-service-with-logging/index.ts @@ -6,7 +6,7 @@ class WillkommenECS extends cdk.Stack { constructor(scope: cdk.App, id: string, props?: cdk.StackProps) { super(scope, id, props); - const vpc = new ec2.Vpc(this, 'MyVpc', { maxAZs: 2 }); + const vpc = new ec2.Vpc(this, 'MyVpc', { maxAzs: 2 }); const cluster = new ecs.Cluster(this, 'Ec2Cluster', { vpc }); cluster.addCapacity('DefaultAutoScalingGroup', { diff --git a/typescript/ecs/ecs-service-with-task-networking/index.ts b/typescript/ecs/ecs-service-with-task-networking/index.ts index a235bf237..1f160b74c 100644 --- a/typescript/ecs/ecs-service-with-task-networking/index.ts +++ b/typescript/ecs/ecs-service-with-task-networking/index.ts @@ -7,7 +7,7 @@ const app = new cdk.App(); const stack = new cdk.Stack(app, 'ec2-service-with-task-networking'); // Create the cluster -const vpc = new ec2.Vpc(stack, 'Vpc', { maxAZs: 2 }); +const vpc = new ec2.Vpc(stack, 'Vpc', { maxAzs: 2 }); const cluster = new ecs.Cluster(stack, 'awsvpc-ecs-demo-cluster', { vpc }); cluster.addCapacity('DefaultAutoScalingGroup', { diff --git a/typescript/ecs/ecs-service-with-task-placement/index.ts b/typescript/ecs/ecs-service-with-task-placement/index.ts index 3a8359512..b387be251 100644 --- a/typescript/ecs/ecs-service-with-task-placement/index.ts +++ b/typescript/ecs/ecs-service-with-task-placement/index.ts @@ -6,7 +6,7 @@ const app = new cdk.App(); const stack = new cdk.Stack(app, 'aws-ecs-integ-ecs'); // Create a cluster -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/typescript/ecs/fargate-load-balanced-service/index.ts b/typescript/ecs/fargate-load-balanced-service/index.ts index b473f6d1b..4eadc2935 100644 --- a/typescript/ecs/fargate-load-balanced-service/index.ts +++ b/typescript/ecs/fargate-load-balanced-service/index.ts @@ -9,7 +9,7 @@ class BonjourFargate extends cdk.Stack { // Create VPC and Fargate Cluster // NOTE: Limit AZs to avoid reaching resource quotas - const vpc = new ec2.Vpc(this, 'MyVpc', { maxAZs: 2 }); + const vpc = new ec2.Vpc(this, 'MyVpc', { maxAzs: 2 }); const cluster = new ecs.Cluster(this, 'Cluster', { vpc }); // Instantiate Fargate Service with just cluster and image diff --git a/typescript/ecs/fargate-service-with-auto-scaling/index.ts b/typescript/ecs/fargate-service-with-auto-scaling/index.ts index dbf6cbc04..4f6365407 100644 --- a/typescript/ecs/fargate-service-with-auto-scaling/index.ts +++ b/typescript/ecs/fargate-service-with-auto-scaling/index.ts @@ -8,7 +8,7 @@ class AutoScalingFargateService extends cdk.Stack { super(scope, id, props); // Create a cluster - const vpc = new ec2.Vpc(this, 'Vpc', { maxAZs: 2 }); + const vpc = new ec2.Vpc(this, 'Vpc', { maxAzs: 2 }); const cluster = new ecs.Cluster(this, 'fargate-service-autoscaling', { vpc }); // Create Fargate Service diff --git a/typescript/ecs/fargate-service-with-local-image/index.ts b/typescript/ecs/fargate-service-with-local-image/index.ts index a6b33933d..84c4ea315 100644 --- a/typescript/ecs/fargate-service-with-local-image/index.ts +++ b/typescript/ecs/fargate-service-with-local-image/index.ts @@ -9,7 +9,7 @@ const stack = new cdk.Stack(app, 'FargateServiceWithLocalImage'); // Create VPC and Fargate Cluster // NOTE: Limit AZs to avoid reaching resource quotas -const vpc = new ec2.Vpc(stack, 'MyVpc', { maxAZs: 2 }); +const vpc = new ec2.Vpc(stack, 'MyVpc', { maxAzs: 2 }); const cluster = new ecs.Cluster(stack, 'Cluster', { vpc }); // Instantiate Fargate Service with a cluster and a local image that gets diff --git a/typescript/ecs/fargate-service-with-logging/index.ts b/typescript/ecs/fargate-service-with-logging/index.ts index be4f4a01e..a530b73b5 100644 --- a/typescript/ecs/fargate-service-with-logging/index.ts +++ b/typescript/ecs/fargate-service-with-logging/index.ts @@ -6,7 +6,7 @@ class WillkommenFargate extends cdk.Stack { constructor(scope: cdk.App, id: string, props?: cdk.StackProps) { super(scope, id, props); - const vpc = new ec2.Vpc(this, 'MyVpc', { maxAZs: 2 }); + const vpc = new ec2.Vpc(this, 'MyVpc', { maxAzs: 2 }); const cluster = new ecs.Cluster(this, 'Ec2Cluster', { vpc }); // create a task definition with CloudWatch Logs diff --git a/typescript/resource-overrides/index.ts b/typescript/resource-overrides/index.ts index baa000e79..7cf2101ea 100644 --- a/typescript/resource-overrides/index.ts +++ b/typescript/resource-overrides/index.ts @@ -88,7 +88,7 @@ class ResourceOverridesExample extends cdk.Stack { bucketResource.addDeletionOverride('Metadata'); bucketResource.addPropertyDeletionOverride('CorsConfiguration.Bar'); - const vpc = new ec2.Vpc(this, 'VPC', { maxAZs: 1 }); + const vpc = new ec2.Vpc(this, 'VPC', { maxAzs: 1 }); const asg = new autoscaling.AutoScalingGroup(this, 'ASG', { instanceType: ec2.InstanceType.of(ec2.InstanceClass.M4, ec2.InstanceSize.XLARGE), machineImage: new ec2.AmazonLinuxImage(),