You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First I define Azurite (Azure Blob Storage emulator) using aspire like so:
var blobstorage = builder
.AddAzureStorage("mystorage")
.RunAsEmulator(azurite =>
azurite.WithLifetime(supportingResourceContainerLifetime)
.WithBlobPort(10000) // should be dynamically assigned by aspire, but hardcoded for sake of this discussion
.WithDataVolume());
I define my dapr binding component like so:
var daprBlobStorageBindingComponent = builder
.AddDaprComponent("myblobstoragebinding", "bindings.azure.blobstorage", new DaprComponentOptions { })
.WithMetadata("accountName", "<azurite account>")
.WithMetadata("accountKey", "<azurite key>")
.WithMetadata("containerName", "mycontainer")
.WithMetadata("endpoint", "http://127.0.0.1:10000") // works with hardcoded string
// .WithMetadata("endpoint", ReferenceExpression.Create($"http://127.0.0.1:10000")) // doesn't work !?!
// .WithMetadata("endpoint", blobstorage.Resource.BlobUriExpression) // what I really want
.WithMetadata("decodeBase64", "false")
.WithMetadata("disableEntityManagement", "true")
.WaitFor(blobstorage);
The problem
When defining the Dapr component I pass the Azurite endpoint via metadata, however:
Passing a ReferenceExpression in .WithMetadata does not seem to work.
Even when my ReferenceExpression is nothing more than eg $"http://127.0.0.1:10000", it still doesn't work.
The Dapr binding does not recognize the passed ReferenceExpression as a valid URL and falls back to 'https://devstoreaccount1.blob.core.windows.net' which is of course not my local azurite anymore.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I'm a bit stuck using Dotnet Aspire and Dapr.
First I define Azurite (Azure Blob Storage emulator) using aspire like so:
I define my dapr binding component like so:
The problem
When defining the Dapr component I pass the Azurite endpoint via metadata, however:
Even when my ReferenceExpression is nothing more than eg $"http://127.0.0.1:10000", it still doesn't work.
The Dapr binding does not recognize the passed ReferenceExpression as a valid URL and falls back to 'https://devstoreaccount1.blob.core.windows.net' which is of course not my local azurite anymore.
Beta Was this translation helpful? Give feedback.
All reactions