most-judge-33290
07/10/2019, 4:27 PMnew awsx.ecs.FargateService(imageName, {
name: imageName,
cluster,
subnets: ['subnet-1', 'subnet-2, 'subnet-3'],
securityGroups: ['sg-x'],
taskDefinitionArgs: {
container: {
image: `<http://myaccount.dkr.ecr.us-west-2.amazonaws.com/${imageName}|myaccount.dkr.ecr.us-west-2.amazonaws.com/${imageName}>`,
cpu: compute || 512 /*10% of 1024*/,
memory: memory || 512 /*MB*/,
portMappings: [targetGroupListener],
environment: environment || [
{ name: 'NODE_ENV', value: 'production' },
{ name: 'PORT', value: '80' },
],
},
},
desiredCount: desiredCount || 2,
});
white-balloon-205
most-judge-33290
07/10/2019, 4:49 PMPlan apply failed: InvalidParameterException: subnets can not be empty.
status code: 400, request id: 0e12e236-0189-418c-a510-6961c10c28be "fieldbook_mobile_api"
white-balloon-205
pulumi preview --diff
does it show you what values are being passed to networkConfiguration
on the Service
? (in particular the subnets
)?most-judge-33290
07/10/2019, 4:57 PMnetworkConfiguration : {
assignPublicIp: true
securityGroups: [
[0]: "sg-x"
]
}
white-balloon-205
subnets
argument will not be passed along. You should though be getting the subnets associated with cluster.vpc.publicSubnetIds
- not clear why that would be empty? (though it's not what you want here regardless).
cc @lemon-spoon-91807
https://github.com/pulumi/pulumi-awsx/blob/e709a077df4233eef0615bad09d0f6828e50f2bd/nodejs/awsx/ecs/fargateService.ts#L210lemon-spoon-91807
07/10/2019, 4:58 PMmost-judge-33290
07/10/2019, 4:59 PMlemon-spoon-91807
07/10/2019, 4:59 PM