Using next-gen, after I create a storage account I...
# azure
g
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
Try
PrimaryEndpoints.Apply(v => v.Blob)
g
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
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