careful-nail-88325
03/22/2024, 7:13 PMOutput.all
so I have to nest multiple calls to apply or Output.all
and then my results ends up something like Output<Output<Output<String>>>
. I there a way to flatten this to Output<String>
?
Also, is there any way to block and get the value of an Output? I'm using some cross stack references and it would simplify things if I could block to get the actual values of the outputs from the stack reference.enough-garden-22763
03/22/2024, 8:06 PMo.apply(x => x)
to flattencareful-nail-88325
03/22/2024, 8:15 PMenough-garden-22763
03/22/2024, 8:23 PMenough-garden-22763
03/22/2024, 8:24 PMenough-garden-22763
03/22/2024, 8:24 PM.flatten()
that does the samecareful-nail-88325
03/23/2024, 2:45 AMfun <T> flatten(output: Output<Output<T>>): Output<T> {
return output.apply { it }
}
fun <T> flatten(output: Output<Output<Output<T>>>): Output<T> {
return output.apply { it }.apply { it }
}
fun <T> flatten(output: Output<Output<Output<Output<T>>>>): Output<T> {
return output.apply { it }.apply { it }.apply { it }
}
// etc
enough-garden-22763
03/25/2024, 4:24 PM