thankful-byte-3518
10/11/2024, 7:20 AMconst appService = new azureNative.web.WebApp(
name,
{
...
identity: {
type: azureNative.web.ManagedServiceIdentityType.SystemAssigned,
},
}, {},
);
I can do this:
const principalId = appService.identity.apply((identity) => identity!.principalId);
However, the types states the identity can be undefined
. Is this a type issue or can the identity by still not provisioned at the time I try to retrieve it?victorious-church-57397
10/11/2024, 7:54 AMconst principalId = appService.identity.principalId.apply((principalId) => principalId);
but if you're planning on using that output with another pulumi resource as an input, you should just be able to pass it in to the resource arguments. inputs/outputs are exchangeablethankful-byte-3518
10/11/2024, 8:34 AMappService.identity
is of type pulumi.Output<azureNative.types.output.web.ManagedServiceIdentityResponse | undefined>
, in short pulumi.Output<Identity | undefined>
, you cannot do .principalId
victorious-church-57397
10/11/2024, 8:36 AM