This message was deleted.
# typescript
s
This message was deleted.
f
You should be able to use
pulumi.interpolate
for this use case
g
that still returns a
pulumi.Output<string>
the type signature for the field is
string[]
f
This is what I ended up doing during the upgrade to v2.
Copy code
const accountId = pulumi.output(aws.getCallerIdentity()).accountId;

accountId.apply(id => {
  do your stuff
}
g
that could work, but i’m using this in a function that returns values and i’d really rather not make it all async like that
actually it might. let me chew on that for a while
yeah it doesn’t work, because i need to return a list of
aws.iam.Role
objects 😕
f
Ah, I missed the other part where you are going to pass that further into another
get
I think the easiest way is to promisify all the way through
One thing that can help here is modify your entrypoint to be async at the top level like shown here: https://www.pulumi.com/docs/intro/languages/javascript/#entrypoint
Then you can write async/await throughout the rest of your code
g
yeah i might have to do that i guess
thank you