Is it possible to use the output hostname from an ...
# general
b
Is it possible to use the output hostname from an AWSX NLB definition as an environment variable in a Fargate service? The service is a proxy which needs to send traffic to an internal NLB
w
This should be possible - if you are using
awsx.ecs.FargateService
you can pass the output from the NLB into the
value:
of one of the environment variables passed to the container.
b
Thanks.
Would that value be like:
proxy_listener.defaultEndpoint.apply(e => e.hostname);
Also, wouldn't I need to use
await
or something for this to work?
w
No - you can pass an
Output
as an
Input
. Doing so will implicitly await the underlying promise. See https://pulumi.io/reference/programming-model.html#outputs for more on this.
b
Thanks.
I don't see where env var setting is documented
Ah, I see it on container now.