https://pulumi.com logo
b

busy-daybreak-68237

03/04/2019, 4:56 PM
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

white-balloon-205

03/04/2019, 5:53 PM
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

busy-daybreak-68237

03/04/2019, 6:58 PM
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

white-balloon-205

03/04/2019, 8:27 PM
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

busy-daybreak-68237

03/04/2019, 10:01 PM
Thanks.
I don't see where env var setting is documented
Ah, I see it on container now.