Edit

Share via


Get started with the Azure Developer CLI compose feature

The Azure Developer CLI (azd) composability (compose) feature enables you to progressively compose the Azure resources required for your app without manually writing Bicep code. Compose also uses Azure Verified Modules (AVM) when possible, providing recommended practices using building blocks for Azure.

Note

The azd compose feature is currently in alpha and shouldn't be used in production apps. Changes to alpha features in subsequent releases can result in breaking changes. Visit the azd feature versioning and release strategy and feature stages pages for more information. Use the Feedback button on the upper right to share feedback about the compose feature and this article.

Enable the compose feature

The azd compose feature is currently in alpha, which means you need to enable it manually. Visit the azd feature stages page for more information.

azd config set alpha.compose on

What is the compose feature?

The azd compose feature offers a new way to get started with azd. Before the compose feature, developers had two primary options to configure the Azure resources to provision and deploy an application:

Any further customization required the user to manually modify the Bicep files—until the introduction of the compose feature.

Streamline resource creation with compose

The azd compose feature introduces a third option to add Azure resources to your apps. Developers use the azd add command to instruct azd to compose new Azure resources and update template configurations using minimal prompt workflows. This feature is useful for developers who want to avoid writing Bicep or using an existing template.

Run the azd add command to start the compose workflow and add a new resource:

azd add

This command begins a prompt-based workflow that allows you to select a new resource to create for your app:

? What would you like to add?  [Use arrows to move, type to filter]
> AI
  Database
  Host service
  Key Vault
  Messaging
  Storage account
  ~Existing resource

When you're finished adding resources with azd add, run azd up or azd provision to create the resources in Azure. azd manages resource creation internally until you Generate Bicep files for the resources for further customization.

Visit the Build a minimal template using the compose feature article for a full walkthrough of this feature.

Services supported by the compose feature

The azd compose feature supports adding resources for the following Azure services:

  • AI
    • Azure AI Services models and Azure AI Foundry
    • Azure OpenAI with Microsoft Entra ID authentication
    • Azure AI Search
  • Database
    • Azure Cosmos DB
    • Azure Cosmos DB for MongoDB
    • Azure Cosmos DB for PostgreSQL
    • Azure Cache for Redis
    • Azure Database for MySQL
  • Host Service
    • Azure Container Apps
    • Azure App Service
  • Key Vault
    • Azure Key Vault
  • Messaging
    • Azure Service Bus
    • Azure Event Hubs
  • Storage Account
    • Azure Blob Storage

Language Support

  • App Service:
    • Python
    • TypeScript
    • JavaScript

Next steps