Skip to content

Commit

Permalink
Update VPCProps to us maxAzs (aws-samples#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
piradeepk authored and NGL321 committed Jul 9, 2019
1 parent 0ee3a14 commit 334131b
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion typescript/ecs/cluster/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion typescript/ecs/ecs-load-balanced-service/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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', {
Expand Down
2 changes: 1 addition & 1 deletion typescript/ecs/ecs-service-with-logging/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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', {
Expand Down
2 changes: 1 addition & 1 deletion typescript/ecs/ecs-service-with-task-networking/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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', {
Expand Down
2 changes: 1 addition & 1 deletion typescript/ecs/ecs-service-with-task-placement/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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', {
Expand Down
2 changes: 1 addition & 1 deletion typescript/ecs/fargate-load-balanced-service/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion typescript/ecs/fargate-service-with-auto-scaling/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion typescript/ecs/fargate-service-with-local-image/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion typescript/ecs/fargate-service-with-logging/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion typescript/resource-overrides/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 334131b

Please sign in to comment.