Aspire.Hosting.Azure.Storage 13.5.2
Azure Storage hosting integration
Use this integration to model, configure, and orchestrate Azure Storage in an Aspire solution.
Getting started
Prerequisites
- Azure subscription - create one for free
Add the integration
From your AppHost directory, add the Aspire.Hosting.Azure.Storage integration with the Aspire CLI:
aspire add Aspire.Hosting.Azure.Storage
Configure Azure Provisioning for local development
Adding Azure resources to the AppHost model will automatically enable development-time provisioning
for Azure resources so that you don't need to configure them manually. Provisioning requires a number of settings
to be available via AppHost configuration. From your AppHost directory, set these values with aspire secret set:
aspire secret set Azure:SubscriptionId "<your subscription id>"
aspire secret set Azure:ResourceGroupPrefix "<prefix for the resource group>"
aspire secret set Azure:Location "<azure location>"
NOTE: Developers must have Owner access to the target subscription so that role assignments can be configured for the provisioned resources.
Usage example
In the AppHost, add a Blob (can use tables or queues also) Storage connection and reference it from another resource with either C# or TypeScript:
C#
var blobs = builder.AddAzureStorage("storage").AddBlobs("blobs");
var myService = builder.AddProject<Projects.MyService>()
.WithReference(blobs);
TypeScript
const blobs = await builder.addAzureStorage("storage").addBlobs("blobs");
const myService = await builder.addNodeApp("myService", "../my-service", "server.js")
.withReference(blobs);
Creating and using blob containers and queues directly
You can create and use blob containers and queues directly by adding them to your storage resource. This allows you to provision and reference specific containers or queues for your services.
Adding a blob container
var storage = builder.AddAzureStorage("storage");
var container = storage.AddBlobContainer("my-container");
The container reference can be passed to another resource:
builder.AddProject<Projects.MyService>()
.WithReference(container);
Adding a queue
var storage = builder.AddAzureStorage("storage");
var queue = storage.AddQueue("my-queue");
The queue reference can be passed to another resource:
builder.AddProject<Projects.MyService>()
.WithReference(queue);
This approach allows you to define and reference specific blob containers and queues as first-class resources in your AppHost model.
Creating and using data lake
var storage = builder.AddAzureStorage("azure-storage");
var dataLake = storage.AddDataLake("data-lake");
var fileSystem = storage.AddDataLakeFileSystem("data-lake-file-system");
The references can be passed to a project:
api.WithReference(dataLake).WithReference(fileSystem);
Connection Properties
When you reference Azure Storage resources using WithReference, the following connection properties are made available to the consuming project:
Azure Storage
The Azure Storage account resource doesn't expose any connection property, reference sub-resources:
Blob Storage
The Blob Storage resource exposes the following connection properties:
| Property Name | Description |
|---|---|
Uri |
The URI of the blob storage service, with the format https://mystorageaccount.blob.core.windows.net/ |
ConnectionString |
Emulator only. The connection string for the blob storage service |
Blob Container
The Blob Container resource inherits all properties from its parent AzureBlobStorageResource and adds:
| Property Name | Description |
|---|---|
BlobContainerName |
The name of the blob container |
Data Lake Storage
The Data Lake Storage resource exposes the following connection properties:
| Property Name | Description |
|---|---|
Uri |
The URI of the data lake storage service, with the format https://mystorageaccount.dfs.core.windows.net/ |
Emulator currently does not support data lake storage.
Data Lake File System
The Data Lake FileSystem resource inherits all properties from its parent AzureDataLakeStorageResource and adds:
| Property Name | Description |
|---|---|
DataLakeFileSystemName |
The name of the data lake file system |
Emulator currently does not support data lake storage.
Queue Storage
The Queue Storage resource exposes the following connection properties:
| Property Name | Description |
|---|---|
Uri |
The URI of the queue storage service, with the format https://mystorageaccount.queue.core.windows.net/ |
ConnectionString |
Emulator only. The connection string for the queue storage service |
Queue
The Queue resource inherits all properties from its parent AzureQueueStorageResource and adds:
| Property Name | Description |
|---|---|
QueueName |
The name of the queue |
ConnectionString |
Emulator only. The connection string for the queue storage service |
Table Storage
The Table Storage resource exposes the following connection properties:
| Property Name | Description |
|---|---|
Uri |
The URI of the table storage service, with the format https://mystorageaccount.table.core.windows.net/ |
ConnectionString |
The connection string for the table storage service |
Aspire exposes each property as an environment variable named [RESOURCE]_[PROPERTY]. For instance, the Uri property of a resource called queue1 becomes QUEUE1_URI.
Additional documentation
- https://aspire.dev/integrations/gallery/
- https://aspire.dev/integrations/cloud/azure/azure-storage-blobs/azure-storage-blobs-host/
- https://aspire.dev/integrations/cloud/azure/azure-storage-queues/azure-storage-queues-host/
- https://aspire.dev/integrations/cloud/azure/azure-storage-tables/azure-storage-tables-host/
- https://learn.microsoft.com/azure/storage/common/storage-introduction
Feedback & contributing
No packages depend on Aspire.Hosting.Azure.Storage.
.NET 8.0
- Aspire.Hosting.Azure (>= 13.5.2)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.11)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 8.0.30)
- Microsoft.Extensions.FileSystemGlobbing (>= 10.0.11)
- Microsoft.Extensions.Hosting (>= 10.0.11)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.11)
- Microsoft.Extensions.Http (>= 10.0.11)
- Microsoft.Extensions.Logging (>= 10.0.11)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.11)
- Microsoft.Extensions.Options (>= 10.0.11)
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 10.0.11)
- Microsoft.Extensions.Primitives (>= 10.0.11)
- Newtonsoft.Json (>= 13.0.4)
- OpenTelemetry.Exporter.OpenTelemetryProtocol (>= 1.15.3)
- OpenTelemetry.Extensions.Hosting (>= 1.15.3)
- Polly.Core (>= 8.6.6)
- Semver (>= 3.0.0)
- StreamJsonRpc (>= 2.25.29)
- System.IO.Hashing (>= 10.0.8)
- System.Text.Json (>= 10.0.11)
- YamlDotNet (>= 16.3.0)
- ModelContextProtocol (>= 1.3.0)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.11)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.11)
- KubernetesClient (>= 19.0.2)
- AspNetCore.HealthChecks.Azure.Storage.Blobs (>= 9.0.0)
- AspNetCore.HealthChecks.Azure.Storage.Queues (>= 9.0.0)
- Azure.Provisioning (>= 1.5.0)
- Azure.Provisioning.Storage (>= 1.1.2)
- Azure.Storage.Files.DataLake (>= 12.26.0)
- AspNetCore.HealthChecks.Uris (>= 9.0.0)
- Azure.Core (>= 1.57.0)
- Azure.Identity (>= 1.21.0)
- Azure.Provisioning.KeyVault (>= 1.1.0)
- Azure.ResourceManager.Authorization (>= 1.1.6)
- Azure.ResourceManager.KeyVault (>= 1.4.0)
- Azure.ResourceManager.Resources (>= 1.11.2)
- Azure.Security.KeyVault.Secrets (>= 4.11.0)
- Azure.Storage.Blobs (>= 12.28.0)
- Azure.Storage.Queues (>= 12.26.0)
- Google.Protobuf (>= 3.34.1)
- Grpc.AspNetCore (>= 2.80.0)
- Grpc.Net.ClientFactory (>= 2.80.0)
- Grpc.Tools (>= 2.80.0)
- Humanizer.Core (>= 3.0.10)
- JsonPatch.Net (>= 5.0.2)
| Version | Downloads | Last updated |
|---|---|---|
| 13.5.2 | 1 | 22.08.2026 |
| 13.5.1 | 0 | 20.08.2026 |
| 13.5.0 | 0 | 18.08.2026 |
| 13.4.6 | 4 | 29.06.2026 |
| 13.4.5 | 5 | 19.06.2026 |
| 13.4.4 | 2 | 19.06.2026 |
| 13.4.3 | 4 | 15.06.2026 |
| 13.4.2 | 4 | 04.06.2026 |
| 13.4.1 | 5 | 04.06.2026 |
| 13.4.0 | 6 | 04.06.2026 |
| 13.3.5 | 6 | 26.05.2026 |
| 13.3.4 | 5 | 26.05.2026 |
| 13.3.3 | 6 | 17.05.2026 |
| 13.3.2 | 3 | 17.05.2026 |
| 13.3.1 | 2 | 17.05.2026 |
| 13.3.0 | 3 | 12.05.2026 |
| 13.2.4 | 4 | 29.04.2026 |
| 13.2.3 | 4 | 29.04.2026 |
| 13.2.2 | 4 | 11.04.2026 |
| 13.2.1 | 4 | 31.03.2026 |
| 13.2.0 | 4 | 31.03.2026 |
| 13.1.3 | 4 | 20.03.2026 |
| 13.1.2 | 4 | 01.03.2026 |
| 13.1.1 | 3 | 21.02.2026 |
| 13.1.0 | 5 | 15.01.2026 |
| 13.0.2 | 6 | 10.12.2025 |
| 13.0.1 | 5 | 10.12.2025 |
| 13.0.0 | 5 | 10.12.2025 |
| 9.5.2 | 5 | 10.12.2025 |
| 9.5.1 | 5 | 10.12.2025 |
| 9.5.0 | 5 | 10.12.2025 |
| 9.4.2 | 6 | 05.09.2025 |
| 9.4.1 | 6 | 05.09.2025 |
| 9.4.0 | 7 | 05.09.2025 |
| 9.3.1 | 6 | 05.09.2025 |
| 9.3.0 | 6 | 05.09.2025 |
| 9.2.1 | 6 | 05.09.2025 |
| 9.2.0 | 6 | 05.09.2025 |
| 9.1.0 | 7 | 04.09.2025 |
| 9.0.0 | 6 | 05.09.2025 |
| 9.0.0-rc.1.24511.1 | 6 | 05.09.2025 |
| 8.2.2 | 6 | 05.09.2025 |
| 8.2.1 | 7 | 05.09.2025 |
| 8.2.0 | 6 | 05.09.2025 |
| 8.1.0 | 6 | 05.09.2025 |
| 8.0.2 | 6 | 05.09.2025 |
| 8.0.1 | 6 | 05.09.2025 |
| 8.0.0 | 6 | 05.09.2025 |
| 8.0.0-preview.7.24251.11 | 6 | 05.09.2025 |
| 8.0.0-preview.6.24214.1 | 6 | 05.09.2025 |
| 8.0.0-preview.5.24201.12 | 7 | 05.09.2025 |