links aren't supported with fargate so how can i d...
# typescript
n
links aren't supported with fargate so how can i do depends on ? trying to get nignx container to connect to php container
Copy code
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
n
it doesnt seem to be available on awsx.ecs.FargateService
@white-balloon-205
f
b
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
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.