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

bitter-dentist-28132

02/12/2020, 11:14 PM
i want to make a JS object dynamically (i.e. push certain keys based on if/else blocks), and then render that JS object as yaml. some deeply nested keys may be
pulumi.Output<>
s. how can i do this?
g

gorgeous-egg-16927

02/12/2020, 11:55 PM
You should be able to do the rendering inside an
apply
. Something along the lines of:
Copy code
pulumi.output(objectToRender).apply(obj => { ... })
The apply will unwrap any nested outputs