File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -424,12 +424,13 @@ export class StacksCloud extends Stack {
424
424
} )
425
425
426
426
const service = new ecs . FargateService ( this , 'WebService' , {
427
+ serviceName : `${ this . appName } -${ appEnv } -web-service` ,
427
428
cluster : ecsCluster ,
428
429
taskDefinition,
429
430
desiredCount : 2 ,
430
431
assignPublicIp : true ,
431
- vpcSubnets : { subnetType : ec2 . SubnetType . PUBLIC } ,
432
432
minHealthyPercent : 75 ,
433
+ securityGroups : [ serviceSecurityGroup ] ,
433
434
} )
434
435
435
436
this . compute . fargate = service
@@ -517,8 +518,12 @@ export class StacksCloud extends Stack {
517
518
} ,
518
519
vpc,
519
520
vpcSubnets : [
520
- { subnetGroupName : `${ this . appName } -${ appEnv } -private-subnet-1` } ,
521
- { subnetGroupName : `${ this . appName } -${ appEnv } -private-subnet-2` } ,
521
+ this . vpc . selectSubnets ( {
522
+ subnetGroupName : `${ this . appName } -${ appEnv } -private-subnet-1` ,
523
+ } ) ,
524
+ this . vpc . selectSubnets ( {
525
+ subnetGroupName : `${ this . appName } -${ appEnv } -private-subnet-2` ,
526
+ } ) ,
522
527
] ,
523
528
capacity : {
524
529
masterNodes : 3 ,
You can’t perform that action at this time.
0 commit comments