https://pulumi.com logo
w

wonderful-dog-9045

04/23/2020, 12:25 PM
given an object with multiple
Output
fields:
Copy code
type Config = { 
   someValue: Ouput<string>,
   otherValue: string,
   andSomeMoreValues: Output<object>,
}
Does pulumi private and helper function that that would in this particular case would do:
Copy code
function helperFunction(config: Config) => Output<{
  someValue: string,
  otherValue: string,
  andSomeMoreValues: string,
}>
so that i don't have to make a messy convolution of
.apply()
calls?
g

green-school-95910

04/23/2020, 12:26 PM
I think wrapping it on
pulumi.output
or
pulumi.all
do exactly that
When you call apply on an output it also traverse outputs inside of it
w

wonderful-dog-9045

04/23/2020, 12:27 PM
pulumi.output(config)
?
g

green-school-95910

04/23/2020, 12:27 PM
Yep
w

wonderful-dog-9045

04/23/2020, 12:27 PM
so
pulumi.output(config).apply(...)
. Cool! thanks.