Skip to content

1.1 Azure Developer CLI

This section is derived from two resources: the BIntroduction to Azure Developer CLI learn module, and the What is Azure Developer CLI documentation.

1. AZD CLI Tool

The Azure Developer CLI (azd) is described as an open-source tool that:

  • accelerates provisioning and deploying app resources on Azure
  • with developer-friendly commands for key stages in your development workflow
  • works in the terminal, in your IDE, and in CI/CD pipelines

The azd tool operates on extensible blueprint templates that provide all the information you need (configuration and code) to get applications provisioned, deployed, and running, on Azure. Create a template from scratch or customize and expand one from the Awesome AZD gallery.

2. AZD Template

The Azure Developer CLI template has the following components:

  • Reusable IaC assets. An infra/ folder with infrastructure-as-code (IaC) assets using template languages like Bicep (Azure-specific) and Terraform (cloud-agnostic) to define resources for applications. These assets are independent of the application source code - and enable consistent, reproducible deployments of the required infrastructure across users.
  • Starter App code. A src/ directory that can be customized or replaced with your own app. This allows you to start with a template that has the right infrastructure configured (which can be complicated for developers) and then focus only on the application development.
  • Configuration files. An azure.yaml configuration file that maps your deployment (services) to provisioned (resources) for the application.
  • Pipeline workflow files (optional). A .github or .azdo/ folder configured for automated CI/CD workflows using GitHub Actions or Azure DevOps pipelines. This allows azd to automate redeployments on code changes without manual (commandline) intervention.

3. AZD Template workflow

The basic steps for using an existing template are:

  1. azd init -t <name> → Initiailize the named template in local folder
  2. azd auth login → Log into an Azure account targeted for deployment
  3. azd up → Provision the resources and deploy the code in 1 command