This message was deleted.
# azure
s
This message was deleted.
b
Looking at this blog post (https://www.pulumi.com/blog/get-up-and-running-with-azure-synapse-and-pulumi/) and the spec of synapse.Workspace - it's similar to the output spec of compute.DiskEncryptionSet and a lot of others in that the
identity
field is not listed in the output (as it is an input), but is still accessible (because all inputs are), and has the same *IdentityResponse type - meaning that it should expose principalId and tenantId. The example uses the `workspace.identity.principalId`though as far as I can tell - typescript will go bananas at the thought of using it (as it does with me). Is this an issue with type declarations or something?
Copy code
Property 'principalId' does not exist on type 'Output<EncryptionSetIdentityResponse | undefined>'.
Considering it's sunday and all, and I don't expect Mikhail to be everywhere all at once - I'll open a github issue on this one as that error does seem to indicate a bug for me 😉
Once again Mikhail is sortof debugging this even in his absence - looking through existing issues, there's one related to RoleAssignmentName (https://github.com/pulumi/pulumi-azure-native/issues/625) in which he links to a c# example where he uses random..
in that code - right below - he's using chained `.apply`'s to get the principalId out of the identity https://github.com/pulumi/examples/blob/2e9e18b36a9720dd0e691f2bfe883bbfd46bd512/azure-cs-synapse/MyStack.cs#L79
t
Yes, you need
apply
. Responded in the issue.
b
so.. taking that c# and putting it into ts makes that line look like this for me:
principalId: diskEncryption.identity.apply(identity => identity?.principalId).apply(principalId => principalId ?? "<preview>")
Thanks Mikhail - closing issue and finally able to deal with real problems 😉