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
{{ message }}
Repository navigation
Docs: Azure Blob Storage env vars differ between local emulator and deployed environments #728
When using Azure Blob Storage with Aspire (addAzureStorage + addBlobContainer), the environment variables injected into the consuming app differ between local development (Azurite emulator) and deployed (Azure) environments, but this is not documented.
This means code that works locally with PLANTDATA_CONNECTIONSTRING breaks in production, and vice versa. The app needs to check for both and handle each case differently, but there's no documentation explaining this asymmetry.
Expected Behavior
The docs for Azure Blob Storage integration should clearly document:
Which environment variables are injected in each environment (local vs deployed)
That CONNECTIONSTRING is only available with the emulator
The recommended pattern for writing code that works in both environments (e.g., check URI first, fall back to CONNECTIONSTRING)
Steps To Reproduce
Create an Aspire app with addAzureStorage('storage').runAsEmulator().addBlobContainer('plantdata')
Reference the blob container from a Next.js/Node app
Note PLANTDATA_CONNECTIONSTRING works locally
Deploy to Azure — PLANTDATA_CONNECTIONSTRING is not set, only PLANTDATA_URI
Aspire Version
Latest Aspire CLI + TypeScript AppHost (Node.js)
Additional Context
Found during #AspiriFridays stream while building a Next.js garden journal app. Our workaround is to check for PLANTDATA_URI first (production) and fall back to PLANTDATA_CONNECTIONSTRING (local), using DefaultAzureCredential for the URI path and BlobServiceClient.fromConnectionString() for the connection string path.
Reporter documents real env-var differences between Azurite (local) and deployed Azure Blob Storage when using AddAzureStorage().AddBlobContainer(...). Before writing docs we need to capture the canonical mapping by reading the integration's WithEnvironment builder in both dev and publish modes. Worth confirming with Maddy Montaquila (@maddymontaquila) (author) whether this is intended behavior or a bug to fix in the integration. Risk of shipping wrong guidance if Copilot infers it from the current MDX alone.
Activity
IEvangelist commentedon Jun 2, 2026
Triage → David Pine (@IEvangelist)
Reporter documents real env-var differences between Azurite (local) and deployed Azure Blob Storage when using
AddAzureStorage().AddBlobContainer(...). Before writing docs we need to capture the canonical mapping by reading the integration'sWithEnvironmentbuilder in both dev and publish modes. Worth confirming with Maddy Montaquila (@maddymontaquila) (author) whether this is intended behavior or a bug to fix in the integration. Risk of shipping wrong guidance if Copilot infers it from the current MDX alone.