https://pulumi.com logo
#general
Title
# general
s

stale-holiday-22431

10/24/2018, 8:01 PM
I’ve created an ElasticSearch cluster in Pulumi. What’s the right way to use the
endpoint
it outputs in the config files I generate for downstream resources? To get that value as a string, do I put the whole downstream resource inside the output’s
apply()
?
w

white-balloon-205

10/24/2018, 8:10 PM
The typical approach is to do something like
prop: r.endpoint.apply(e => transform(e))
That is, use
apply
to compute the value to pass as an input to some resource, instead of creating the resource itself within the
apply
.
s

stale-holiday-22431

10/24/2018, 8:13 PM
Ah, so I can use these transformed `Output`s in place of string parameters in my resources?
Yep, that worked. Thanks!
w

white-balloon-205

10/24/2018, 8:22 PM
Yes - all inputs to resources are
Input<T>
which accepts a T or an Output<T>.