https://pulumi.com logo
Title
m

millions-furniture-75402

03/08/2021, 4:44 PM
I need to get a collection of lambda function ARNs using the aws-sdk (using promises) prior to executing my infrastructure as code. How do I go about ensuring my promises resolve prior to executing the Pulumi plan?
d

damp-school-17708

03/08/2021, 4:51 PM
I guess you need await Promise.All(...your-list-of-promises); that way you should have them all another example, maybe more clear: await Promise.All([foo.promise(), bar.promise()]); hth
f

faint-table-42725

03/08/2021, 5:02 PM
Another thing to keep in mind is that
Input<T> = T | Promise<T> | OutputInstance<T>;
So if you pass in the promise as an input at any point to a resource, the runtime will ensure the promise is resolved as part of constructing the resource
👍 1
m

millions-furniture-75402

03/08/2021, 5:27 PM
Thanks for the advice!