i want to make a JS object dynamically (i.e. push ...
# general
b
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
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