Use existing azd workflows
The Azure Developer CLI (azd) is still supported with Aspire for existing workflows, but it is no longer the recommended default deployment path.
When to use azd
Section titled “When to use azd”While aspire deploy is the recommended path, azd still makes sense when:
- You have existing
azdworkflows and infrastructure templates you want to continue using. - You need
azd pipeline configfor automated CI/CD setup with GitHub Actions or Azure DevOps. - You want to use
azdenvironment management features to manage multiple deployment environments. - You’re working with teams already familiar with
azdconventions and tooling.
Use azd docs for the azd workflow
Section titled “Use azd docs for the azd workflow”This page does not duplicate azd’s full operational workflow. For install, initialization, provisioning, deployment, environment management, and CI/CD setup, use the Azure Developer CLI docs:
- Install
azd - Initialize an existing app with
azd - Provision and deploy with
azd up - Manage environments with
azd env - Configure CI/CD with
azd pipeline config
Resource naming
Section titled “Resource naming”The aspire deploy path and azd use different resource naming schemes by default. If you’re upgrading from an existing azd deployment to aspire deploy, use WithAzdResourceNaming() to preserve the original naming convention. This avoids creating duplicate Azure resources:
var builder = DistributedApplication.CreateBuilder(args);
builder.AddAzureContainerAppEnvironment("env") .WithAzdResourceNaming();import { function createBuilder(): IDistributedApplicationBuilder
Creates a new distributed application builder
createBuilder } from './.modules/aspire.js';
const const builder: IDistributedApplicationBuilder
builder = await function createBuilder(): IDistributedApplicationBuilder
Creates a new distributed application builder
createBuilder();
const const env: AzureContainerAppEnvironmentResource
env = await const builder: IDistributedApplicationBuilder
builder.IDistributedApplicationBuilder.addAzureContainerAppEnvironment(name: string): AzureContainerAppEnvironmentResource
Adds an Azure Container App Environment resource
addAzureContainerAppEnvironment('env');await const env: AzureContainerAppEnvironmentResource
env.AzureContainerAppEnvironmentResource.withAzdResourceNaming(): AzureContainerAppEnvironmentResource
Configures resources to use azd naming conventions
withAzdResourceNaming();Environments and configuration
Section titled “Environments and configuration”azd has its own environment system, and that environment context can flow into your AppHost. When azd invokes the AppHost, it passes the DOTNET_ENVIRONMENT value from the active azd environment’s .env file to the AppHost process.
To configure this, set DOTNET_ENVIRONMENT in your azd environment:
azd env set DOTNET_ENVIRONMENT stagingazd up# → AppHost runs with DOTNET_ENVIRONMENT=staging# → builder.Environment.IsEnvironment("staging") returns trueYour AppHost code can branch on this value to vary topology or configuration per environment, as described in the Environments guide.
How parameters work with azd
Section titled “How parameters work with azd”Aspire parameters and azd inputs follow different paths:
| Parameter type | How it reaches Azure resources |
|---|---|
Aspire parameters (AddParameter) | Resolved by the AppHost through .NET configuration when generating the manifest. Use appsettings.{env}.json or environment variables. |
azd infrastructure inputs (Bicep parameters) | Prompted by azd provision and stored in .azure/{name}/config.json. Used by azd directly during Bicep deployment — not passed to the AppHost. |
| Secrets | Prompted by azd provision and stored in a local vault. Injected into Bicep parameters during provisioning. |
Manifest compatibility
Section titled “Manifest compatibility”azd currently consumes the legacy deployment manifest behind the scenes. Treat that manifest as an implementation detail, not as part of the recommended Aspire deployment model. In most cases, you do not need to generate, inspect, or edit it directly.
If you’re maintaining an existing azd integration or debugging legacy manifest generation, see Legacy deployment manifest format.
See also
Section titled “See also”- Deploy to Azure — recommended deployment path
- Environments
- Legacy deployment manifest format
- Azure Developer CLI documentation