@@ -13,7 +13,7 @@ export = {
13
13
const stack = new cdk . Stack ( ) ;
14
14
const vpc = new ec2 . VpcNetwork ( stack , 'MyVpc' , { } ) ;
15
15
const cluster = new ecs . Cluster ( stack , 'EcsCluster' , { vpc } ) ;
16
- cluster . addDefaultAutoScalingGroupCapacity ( 'DefaultAutoScalingGroup' , { instanceType : new ec2 . InstanceType ( 't2.micro' ) } ) ;
16
+ cluster . addCapacity ( 'DefaultAutoScalingGroup' , { instanceType : new ec2 . InstanceType ( 't2.micro' ) } ) ;
17
17
const taskDefinition = new ecs . Ec2TaskDefinition ( stack , 'Ec2TaskDef' ) ;
18
18
19
19
taskDefinition . addContainer ( "web" , {
@@ -54,7 +54,7 @@ export = {
54
54
const stack = new cdk . Stack ( ) ;
55
55
const vpc = new ec2 . VpcNetwork ( stack , 'MyVpc' , { } ) ;
56
56
const cluster = new ecs . Cluster ( stack , 'EcsCluster' , { vpc } ) ;
57
- cluster . addDefaultAutoScalingGroupCapacity ( 'DefaultAutoScalingGroup' , { instanceType : new ec2 . InstanceType ( 't2.micro' ) } ) ;
57
+ cluster . addCapacity ( 'DefaultAutoScalingGroup' , { instanceType : new ec2 . InstanceType ( 't2.micro' ) } ) ;
58
58
const taskDefinition = new ecs . Ec2TaskDefinition ( stack , 'Ec2TaskDef' ) ;
59
59
taskDefinition . addContainer ( 'BaseContainer' , {
60
60
image : ecs . ContainerImage . fromDockerHub ( 'test' ) ,
@@ -79,7 +79,7 @@ export = {
79
79
const stack = new cdk . Stack ( ) ;
80
80
const vpc = new ec2 . VpcNetwork ( stack , 'MyVpc' , { } ) ;
81
81
const cluster = new ecs . Cluster ( stack , 'EcsCluster' , { vpc } ) ;
82
- cluster . addDefaultAutoScalingGroupCapacity ( 'DefaultAutoScalingGroup' , { instanceType : new ec2 . InstanceType ( 't2.micro' ) } ) ;
82
+ cluster . addCapacity ( 'DefaultAutoScalingGroup' , { instanceType : new ec2 . InstanceType ( 't2.micro' ) } ) ;
83
83
const taskDefinition = new ecs . Ec2TaskDefinition ( stack , 'Ec2TaskDef' ) ;
84
84
taskDefinition . addContainer ( 'BaseContainer' , {
85
85
image : ecs . ContainerImage . fromDockerHub ( 'test' ) ,
@@ -124,7 +124,7 @@ export = {
124
124
const stack = new cdk . Stack ( ) ;
125
125
const vpc = new ec2 . VpcNetwork ( stack , 'MyVpc' , { } ) ;
126
126
const cluster = new ecs . Cluster ( stack , 'EcsCluster' , { vpc } ) ;
127
- cluster . addDefaultAutoScalingGroupCapacity ( 'DefaultAutoScalingGroup' , { instanceType : new ec2 . InstanceType ( 't2.micro' ) } ) ;
127
+ cluster . addCapacity ( 'DefaultAutoScalingGroup' , { instanceType : new ec2 . InstanceType ( 't2.micro' ) } ) ;
128
128
const taskDefinition = new ecs . Ec2TaskDefinition ( stack , 'Ec2TaskDef' ) ;
129
129
130
130
taskDefinition . addContainer ( "web" , {
@@ -152,7 +152,7 @@ export = {
152
152
const stack = new cdk . Stack ( ) ;
153
153
const vpc = new ec2 . VpcNetwork ( stack , 'MyVpc' , { } ) ;
154
154
const cluster = new ecs . Cluster ( stack , 'EcsCluster' , { vpc } ) ;
155
- cluster . addDefaultAutoScalingGroupCapacity ( 'DefaultAutoScalingGroup' , { instanceType : new ec2 . InstanceType ( 't2.micro' ) } ) ;
155
+ cluster . addCapacity ( 'DefaultAutoScalingGroup' , { instanceType : new ec2 . InstanceType ( 't2.micro' ) } ) ;
156
156
const taskDefinition = new ecs . Ec2TaskDefinition ( stack , 'Ec2TaskDef' , {
157
157
networkMode : NetworkMode . Bridge
158
158
} ) ;
@@ -184,7 +184,7 @@ export = {
184
184
const stack = new cdk . Stack ( ) ;
185
185
const vpc = new ec2 . VpcNetwork ( stack , 'MyVpc' , { } ) ;
186
186
const cluster = new ecs . Cluster ( stack , 'EcsCluster' , { vpc } ) ;
187
- cluster . addDefaultAutoScalingGroupCapacity ( 'DefaultAutoScalingGroup' , { instanceType : new ec2 . InstanceType ( 't2.micro' ) } ) ;
187
+ cluster . addCapacity ( 'DefaultAutoScalingGroup' , { instanceType : new ec2 . InstanceType ( 't2.micro' ) } ) ;
188
188
const taskDefinition = new ecs . Ec2TaskDefinition ( stack , 'Ec2TaskDef' , {
189
189
networkMode : NetworkMode . AwsVpc
190
190
} ) ;
@@ -235,7 +235,7 @@ export = {
235
235
const stack = new cdk . Stack ( ) ;
236
236
const vpc = new ec2 . VpcNetwork ( stack , 'MyVpc' , { } ) ;
237
237
const cluster = new ecs . Cluster ( stack , 'EcsCluster' , { vpc } ) ;
238
- cluster . addDefaultAutoScalingGroupCapacity ( 'DefaultAutoScalingGroup' , { instanceType : new ec2 . InstanceType ( 't2.micro' ) } ) ;
238
+ cluster . addCapacity ( 'DefaultAutoScalingGroup' , { instanceType : new ec2 . InstanceType ( 't2.micro' ) } ) ;
239
239
const taskDefinition = new ecs . Ec2TaskDefinition ( stack , 'Ec2TaskDef' , {
240
240
networkMode : NetworkMode . AwsVpc
241
241
} ) ;
@@ -263,7 +263,7 @@ export = {
263
263
const stack = new cdk . Stack ( ) ;
264
264
const vpc = new ec2 . VpcNetwork ( stack , 'MyVpc' , { } ) ;
265
265
const cluster = new ecs . Cluster ( stack , 'EcsCluster' , { vpc } ) ;
266
- cluster . addDefaultAutoScalingGroupCapacity ( 'DefaultAutoScalingGroup' , { instanceType : new ec2 . InstanceType ( 't2.micro' ) } ) ;
266
+ cluster . addCapacity ( 'DefaultAutoScalingGroup' , { instanceType : new ec2 . InstanceType ( 't2.micro' ) } ) ;
267
267
const taskDefinition = new ecs . Ec2TaskDefinition ( stack , 'Ec2TaskDef' ) ;
268
268
269
269
taskDefinition . addContainer ( "web" , {
@@ -292,7 +292,7 @@ export = {
292
292
const stack = new cdk . Stack ( ) ;
293
293
const vpc = new ec2 . VpcNetwork ( stack , 'MyVpc' , { } ) ;
294
294
const cluster = new ecs . Cluster ( stack , 'EcsCluster' , { vpc } ) ;
295
- cluster . addDefaultAutoScalingGroupCapacity ( 'DefaultAutoScalingGroup' , { instanceType : new ec2 . InstanceType ( 't2.micro' ) } ) ;
295
+ cluster . addCapacity ( 'DefaultAutoScalingGroup' , { instanceType : new ec2 . InstanceType ( 't2.micro' ) } ) ;
296
296
const taskDefinition = new ecs . Ec2TaskDefinition ( stack , 'Ec2TaskDef' ) ;
297
297
298
298
taskDefinition . addContainer ( "web" , {
@@ -323,7 +323,7 @@ export = {
323
323
const stack = new cdk . Stack ( ) ;
324
324
const vpc = new ec2 . VpcNetwork ( stack , 'MyVpc' , { } ) ;
325
325
const cluster = new ecs . Cluster ( stack , 'EcsCluster' , { vpc } ) ;
326
- cluster . addDefaultAutoScalingGroupCapacity ( 'DefaultAutoScalingGroup' , { instanceType : new ec2 . InstanceType ( 't2.micro' ) } ) ;
326
+ cluster . addCapacity ( 'DefaultAutoScalingGroup' , { instanceType : new ec2 . InstanceType ( 't2.micro' ) } ) ;
327
327
const taskDefinition = new ecs . Ec2TaskDefinition ( stack , 'Ec2TaskDef' ) ;
328
328
329
329
taskDefinition . addContainer ( "web" , {
@@ -354,7 +354,7 @@ export = {
354
354
const stack = new cdk . Stack ( ) ;
355
355
const vpc = new ec2 . VpcNetwork ( stack , 'MyVpc' , { } ) ;
356
356
const cluster = new ecs . Cluster ( stack , 'EcsCluster' , { vpc } ) ;
357
- cluster . addDefaultAutoScalingGroupCapacity ( 'DefaultAutoScalingGroup' , { instanceType : new ec2 . InstanceType ( 't2.micro' ) } ) ;
357
+ cluster . addCapacity ( 'DefaultAutoScalingGroup' , { instanceType : new ec2 . InstanceType ( 't2.micro' ) } ) ;
358
358
const taskDefinition = new ecs . Ec2TaskDefinition ( stack , 'Ec2TaskDef' ) ;
359
359
360
360
taskDefinition . addContainer ( "web" , {
@@ -381,7 +381,7 @@ export = {
381
381
const stack = new cdk . Stack ( ) ;
382
382
const vpc = new ec2 . VpcNetwork ( stack , 'MyVpc' ) ;
383
383
const cluster = new ecs . Cluster ( stack , 'EcsCluster' , { vpc } ) ;
384
- cluster . addDefaultAutoScalingGroupCapacity ( 'DefaultAutoScalingGroup' , { instanceType : new ec2 . InstanceType ( 't2.micro' ) } ) ;
384
+ cluster . addCapacity ( 'DefaultAutoScalingGroup' , { instanceType : new ec2 . InstanceType ( 't2.micro' ) } ) ;
385
385
const taskDefinition = new ecs . Ec2TaskDefinition ( stack , 'Ec2TaskDef' ) ;
386
386
387
387
taskDefinition . addContainer ( "web" , {
@@ -411,7 +411,7 @@ export = {
411
411
const stack = new cdk . Stack ( ) ;
412
412
const vpc = new ec2 . VpcNetwork ( stack , 'MyVpc' ) ;
413
413
const cluster = new ecs . Cluster ( stack , 'EcsCluster' , { vpc } ) ;
414
- cluster . addDefaultAutoScalingGroupCapacity ( 'DefaultAutoScalingGroup' , { instanceType : new ec2 . InstanceType ( 't2.micro' ) } ) ;
414
+ cluster . addCapacity ( 'DefaultAutoScalingGroup' , { instanceType : new ec2 . InstanceType ( 't2.micro' ) } ) ;
415
415
const taskDefinition = new ecs . Ec2TaskDefinition ( stack , 'Ec2TaskDef' ) ;
416
416
417
417
taskDefinition . addContainer ( "web" , {
@@ -438,7 +438,7 @@ export = {
438
438
const stack = new cdk . Stack ( ) ;
439
439
const vpc = new ec2 . VpcNetwork ( stack , 'MyVpc' , { } ) ;
440
440
const cluster = new ecs . Cluster ( stack , 'EcsCluster' , { vpc } ) ;
441
- cluster . addDefaultAutoScalingGroupCapacity ( 'DefaultAutoScalingGroup' , { instanceType : new ec2 . InstanceType ( 't2.micro' ) } ) ;
441
+ cluster . addCapacity ( 'DefaultAutoScalingGroup' , { instanceType : new ec2 . InstanceType ( 't2.micro' ) } ) ;
442
442
const taskDefinition = new ecs . Ec2TaskDefinition ( stack , 'Ec2TaskDef' ) ;
443
443
444
444
taskDefinition . addContainer ( "web" , {
@@ -469,7 +469,7 @@ export = {
469
469
const stack = new cdk . Stack ( ) ;
470
470
const vpc = new ec2 . VpcNetwork ( stack , 'MyVpc' , { } ) ;
471
471
const cluster = new ecs . Cluster ( stack , 'EcsCluster' , { vpc } ) ;
472
- cluster . addDefaultAutoScalingGroupCapacity ( 'DefaultAutoScalingGroup' , { instanceType : new ec2 . InstanceType ( 't2.micro' ) } ) ;
472
+ cluster . addCapacity ( 'DefaultAutoScalingGroup' , { instanceType : new ec2 . InstanceType ( 't2.micro' ) } ) ;
473
473
const taskDefinition = new ecs . Ec2TaskDefinition ( stack , 'Ec2TaskDef' ) ;
474
474
475
475
taskDefinition . addContainer ( "web" , {
@@ -498,7 +498,7 @@ export = {
498
498
const stack = new cdk . Stack ( ) ;
499
499
const vpc = new ec2 . VpcNetwork ( stack , 'VPC' ) ;
500
500
const cluster = new ecs . Cluster ( stack , 'Cluster' , { vpc } ) ;
501
- cluster . addDefaultAutoScalingGroupCapacity ( 'DefaultAutoScalingGroup' , { instanceType : new ec2 . InstanceType ( 't2.micro' ) } ) ;
501
+ cluster . addCapacity ( 'DefaultAutoScalingGroup' , { instanceType : new ec2 . InstanceType ( 't2.micro' ) } ) ;
502
502
const taskDefinition = new ecs . Ec2TaskDefinition ( stack , 'TD' , { networkMode : ecs . NetworkMode . Host } ) ;
503
503
const container = taskDefinition . addContainer ( 'web' , {
504
504
image : ecs . ContainerImage . fromDockerHub ( 'test' ) ,
0 commit comments