I’d like to create the app service then get the se...
# typescript
r
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
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
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
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