https://pulumi.com logo
Title
g

glamorous-helmet-50600

02/01/2021, 3:08 PM
Using next-gen, after I create a storage account I have access to a PrimaryEndpoints property, but being an Output<EndpointsResponse> I can't access what I really want, which is the "Blob" property. What would be the appropriate way to retrieve that? doing myStgAccount.PrimaryEndpoints.Blob doesn't work and I've not came across any examples that would show how this is meant to be done. Thanks
t

tall-librarian-49374

02/01/2021, 3:21 PM
Try
PrimaryEndpoints.Apply(v => v.Blob)
g

glamorous-helmet-50600

02/01/2021, 3:28 PM
Thank you very much, that seems to work, although it got me a bit confused. I guess it makes sense because I'm not retrieving the storage account explicitly, only accessing the Outputs of its creation (which is almost the same thing but with the added Output wrappings).
t

tall-librarian-49374

02/01/2021, 4:16 PM
Output is sort of like a Promise/Task/Future - it’s a container for a value which gets resolved at some point. And
Apply
is the way to convert it to another value that can then be assigned e.g. to an input of another resource.
👍 1