https://pulumi.com logo
#typescript
Title
# typescript
r

rough-window-15889

03/22/2021, 1:41 PM
I’d like to create the app service then get the service principal from the newly created app service in azure, is there a best way to accomplish this? Should I wrap the app in a async function and await to get it to happen in the correct order and wait for the app to finish being created? I know I can’t use the output name of the app as the argument for getServicePrincipal because that will just pass it as an Output<string>. Is there a better way of accomplishing this?
b

better-shampoo-48884

03/22/2021, 2:14 PM
one sec, I'll paste you something useful 🙂
depending on how deep you need to go:
Copy code
principalId: aks.identity.apply(identity => identity?.principalId).apply(principalId => principalId ?? "<preview>")
that's for aks mind you, but I presume that most of these identity things are similar 🙂
r

rough-window-15889

03/22/2021, 2:16 PM
That makes me feel better. Was doing it in a way similar to this so good to know I was on the right track. Thanks so much!
b

better-shampoo-48884

03/22/2021, 2:18 PM
no prob 🙂
..if it makes you feel better, that line has a comment next to it in my code:
// oh lawd but it is oogly.
😂 1