Azure Developer CLI (azd)
The Azure Developer CLI (azd) is a developer-oriented command-line tool that can provision Azure resources and deploy applications from your local environment or CI/CD pipelines. It integrates with Aspire by consuming the deployment manifest format to understand your app model and automatically provision the corresponding Azure resources.
[!TIP] Recommended: aspire deploy For new Azure deployments, we recommend using
aspire deploydirectly. It offers a simpler workflow, supports more Azure targets, and doesn't require an intermediate manifest. See Deploy using the Aspire CLI.
When to use azd
While aspire deploy is the recommended path, azd remains useful in several scenarios:
- 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.
Prerequisites
- Azure Developer CLI installed
- An active Azure subscription — create one for free
- Aspire CLI installed
Basic workflow
- 1
Initialize your project — run
azd initfrom your AppHost directory. When prompted, select Use code in the current directory soazddetects the Aspire app model.azd init - 2
Provision and deploy — run
azd upto provision the required Azure resources and deploy your application in a single step. This combines theazd provisionandazd deploycommands.azd up - 3
Redeploy without reprovisioning — after the initial deployment, use
azd deployto push code changes without reprovisioning infrastructure.azd deploy
aspire deploy vs azd comparison
| Feature | aspire deploy |
azd |
|---|---|---|
| Azure Container Apps | ✅ | ✅ |
| Azure App Service | ✅ | ❌ |
| Infrastructure provisioning | Built-in | Built-in |
| CI/CD pipeline setup | Manual | azd pipeline config |
| Environment management | State caching | azd env |
| Manifest dependency | No | Yes |
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:
C#
var builder = DistributedApplication.CreateBuilder(args);
builder.AddAzureContainerAppEnvironment("env")
.WithAzdResourceNaming();
TypeScript
const builder = await createBuilder();
const env = await builder.addAzureContainerAppEnvironment('env');
await env.withAzdResourceNaming();
Deployment manifest
The azd tool relies on the deployment manifest format to understand your application topology. The manifest is a JSON document generated from the AppHost that describes resources, bindings, and parameters. It's produced automatically when azd invokes the AppHost during deployment.
Caution
The deployment manifest format is deprecated and no longer being evolved. New
features and deployment targets are delivered through the aspire deploy
path. See Deploy using the Aspire
CLI.
See also
- Deploy using the Aspire CLI — recommended deployment path
- Deployment manifest format
- Azure Developer CLI documentation