https://pulumi.com logo
Title
n

nutritious-battery-42762

11/15/2019, 4:48 PM
links aren't supported with fargate so how can i do depends on ? trying to get nignx container to connect to php container
const appService = new awsx.ecs.FargateService("app-svc2", {
    cluster,
    taskDefinitionArgs: {
        containers: {
            php: {
                image: img,
                cpu: 102 /*10% of 1024*/,
                memory: 50 /*MB*/,
                essential: true
            },
            nginx: {
                image: nginx,
                cpu: 102 /*10% of 1024*/,
                memory: 50 /*MB*/,
                portMappings: [web],
                essential: true,
                
            },
        }
    },
    desiredCount: 2
});
w

white-balloon-205

11/15/2019, 4:53 PM
n

nutritious-battery-42762

11/15/2019, 4:55 PM
it doesnt seem to be available on awsx.ecs.FargateService
@white-balloon-205
f

future-barista-68134

11/18/2019, 5:17 PM
b

big-piano-35669

11/18/2019, 8:58 PM
I actually don't think you're looking for dependsOn here. Fargate doesn't support links, so you would need to use an EC2 backed cluster. For instance, see https://www.pulumi.com/docs/guides/crosswalk/aws/ecs/#creating-an-auto-scaling-group-for-ecs-cluster-instances
w

white-balloon-205

11/18/2019, 10:18 PM
it doesnt seem to be available on awsx.ecs.FargateService
Yes - it looks like this is just missing from the
Container
interface in
awsx
. If you pass it in there (and cast to
<any>
) I believe it will work. We'll make sure to get it added. Re:
dependsOn
naming confusion - there are two different things - the Pulumi
dependsOn
feature and the ECS
dependsOn
task definition parameter. The later is what is desired/needed here.