https://pulumi.com logo
Title
d

damp-accountant-65956

10/06/2021, 6:31 PM
what's the best way to use
ctx.Export()
to export an array of values? Like I am creating a VPC and then an arbitrary number of subnets and I want to export each subnet's ARN, ID and name so I was trying to export an array of maps but I can't quite figure out how to cast things to outputs properly and use apply... just wondering if there were any examples I could look at?
m

mammoth-honey-6147

10/12/2021, 5:45 PM
Did you find an answer to this?
I'm currently trying to see if I can shove everything into a
struct
and output that
r

red-match-15116

10/12/2021, 6:22 PM
You can
ctx.Export
a
pulumi.Map
or
pulumi.Array
m

mammoth-honey-6147

10/12/2021, 6:42 PM
Awesome, thanks @red-match-15116