How would I set the health check params on a LB de...
# general
f
How would I set the health check params on a LB defined like:
Copy code
let fibLB = infra.x.ecs.LoadBalancer.fromPortInfo("fib-fargate-lb", {
    cluster: cluster,
    port: 80,
    targetPort: 8080,
    external: true,
    protocol: "http"
});
The health check needs to be set on the target group, not the LB 🤔
I tried doing this
Copy code
let fibTG = new aws.elasticloadbalancingv2.TargetGroup("fib-tg", {
    protocol: "HTTP",
    port: 8080,
    vpcId: network.vpcId,
    healthCheck: {
        healthyThreshold: 2,
        unhealthyThreshold: 10,
        timeout: 5,
        interval: 300
    }
});

let fibLB2 = infra.x.ecs.LoadBalancer.fromTargetGroupInfo("fib-fargate-lb", {
    targetGroupArn: fibTG.arn,
    hostPort: 80,
    containerPort: 8080
});
But
targetGroupArn
cannot be a
Output<string>
. Using
fromTargetGroupInfo
doesn't let you specify a cluster. Is that ok?
@lemon-spoon-91807 This seems like something that could be supported by
fromPortInfo
.
l
this is waht i'm working on right now.
f
Gotcha
l
wip 🙂
but the existing infra.x.ecs.LoadBalancer is going away
it was a temporary measure to get Service/TaskDef off the ground
f
Ok, I'll follow that PR.