Hey Guys, I’m trying to get azure subscriptionId f...
# general
w
Hey Guys, I’m trying to get azure subscriptionId from azure-native. And a bit confused with Input/Output
Copy code
const azure = authorization.getClientConfig();
const subscriptionId = azure.then(azure => azure.subscriptionId)

new authorization.RoleAssignment("ass", {
  principalId: kprincipalId,
  principalType: "ServicePrincipal",
  roleDefinitionId:
    `/subscriptions/${subscriptionId}/providers/Microsoft.Authorization/roleDefinitions/${id}`,
  scope: resourceGroup.id,
});
And I’m still got
[object Promise]
for subscriptionId. What I’m missing?
b
@wooden-receptionist-75654 have a look here, you need to await the authorization call https://github.com/pulumi/examples/blob/ca40203279f393c0c159dadcadc97c6007122997/azure-ts-call-azure-sdk/index.ts
w
@billowy-army-68599 thank you!