shy-microphone-28807
01/10/2020, 9:19 PMpulumi.all
the right way to do that?astonishing-cartoon-37000
01/10/2020, 9:27 PMpulumi.Output<awsAccounts>[]
then I think you can simply psuedo-js-code
const awsAccounts = Pulumi.Output<aswAccounts>[]
const accountIds = awsAccounts.map(account => account.apply(val => val.id))
idk if it's "right way to do it"pulumi.Output<ids>
shy-microphone-28807
01/10/2020, 9:30 PMstring[]
but cannot figure out how to accomplish that and keep typescript happyconst sourceIds = pulumi.all([account, otherAccount]).apply(accounts => accounts.map(a => a.id.get())).get()
makes the compiler happy but still need to do a test run, it seems like there should be a simpler way to do thatastonishing-cartoon-37000
01/10/2020, 9:41 PM.get()
says : This function is only callable in code that runs in the cloud post-deployment.
This function is only callable in code that runs in the cloud post-deployment. At this point all Output values will be known and can be safely retrieved. During pulumi deployment or preview execution this must not be called
shy-microphone-28807
01/10/2020, 9:42 PMastonishing-cartoon-37000
01/10/2020, 9:43 PM.apply()
has worked for me in the past, but I feel that it isn't a good pattern. None of it will show in previewacoustic-florist-12628
01/10/2020, 10:50 PMshy-microphone-28807
01/13/2020, 9:22 PM