microsoft / microsoft/aspire

Support for AddAzureStorage extensions with RunAsEmulator to have multiple accounts

Open
#13,265 4 comments 2 reactions 1 assignee Assigned to @Copilot View on GitHub
area-integrations azure azure-storage
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 15h
Merged PRs (30d)
196

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Is your feature request related to a problem? Please describe the problem.

I am trying to get Aspire up and running with Azure Storage. My requirement is to use Azure Tables, Blobs, and Queues under separate accounts without the need to run multiple Azurite containers.
Azurite itself supports multiple accounts as described at [Azurite use-custom-storage-accounts-and-keys](https://learn.microsoft.com/en-us/azure/storage/common/storage-connect-azurite?toc=%2Fazure%2Fstorage%2Fblobs%2Ftoc.json&bc=%2Fazure%2Fstorage%2Fblobs%2Fbreadcrumb%2Ftoc.json&tabs=blob-storage#use-custom-storage-accounts-and-keys)
However, with Aspire this does not seem possible..

Desire to have this is due to:
- Resource pressure
- The more containers running the more pressure on local machine,
- CI has limited resources when tests are run.
- Application requirements
- One storage account is used for legacy tables (old structure).
- Another storage account is used for new tables due to historical schema changes.
- Isolation between containers
- The application references another container that also requires Azure Tables.
- Reusing the same connection would cause pollution of the storage and potential table conflicts.
- Integration testing
- Multiple accounts are used to keep test data separated and allow clean parallelization, for example
- One account for persistence tests
- Another for system tests
- Additional accounts for other scenarios

### Describe the solution you'd like

When using `AddAzureStorage` with `RunAsEmulator` to have the capability to define the account to use for `AddTables`, `AddBlobs`, `AddQueues`.

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.