azd stands for Azure Developer CLI and is pronounced "az-dee" (A-Z-D). It is a command-line tool from Microsoft that helps developers build, deploy, and manage cloud applications on Azure using best practices.
- Scaffold new projects with best-practice templates
- Provision Azure resources (infrastructure) using Infrastructure as Code (IaC)
- Deploy your application code to Azure
- Manage environments (dev, test, prod)
- Integrate with CI/CD tools like GitHub Actions
Open PowerShell and run:
winget install microsoft.azdOr follow the official instructions:
https://learn.microsoft.com/en-us/azure/developer/azure-developer-cli/install-azd
-
Initialize a project
azd init
- What it does:
- Prompts you to select a project template (or use your own code/infra).
- Sets up an
azd.yamlfile describing your app, services, and infra. - Creates a
.azure/folder for environment and state management. - Optionally scaffolds sample code and infrastructure (if using a template).
- About templates:
- azd templates are pre-built, best-practice solutions for common Azure scenarios (web apps, microservices, serverless, data/AI, full-stack, etc.).
- You can browse available templates at:
- Choose a template that matches your tech stack and architecture, or select "empty"/"custom" to use your own code and infrastructure.
- Templates include sample code, infrastructure-as-code (Bicep), and configuration for rapid setup.
- Result:
- Your project is now azd-enabled, with configuration files for deployment and environment management.
- What it does:
-
Provision Azure resources
azd provision
- What it does:
- Reads your infrastructure-as-code files (e.g., Bicep in
infra/). - Deploys all required Azure resources (e.g., databases, web apps, key vaults) to your selected environment.
- Stores environment-specific outputs (like connection strings) in
.envfiles.
- Reads your infrastructure-as-code files (e.g., Bicep in
- Result:
- All Azure infrastructure for your app is created and ready for use.
- What it does:
-
Deploy your app
azd deploy
- What it does:
- Builds and deploys your application code (frontend, backend, etc.) to the provisioned Azure resources.
- Uses the environment settings and outputs from the provision step.
- Result:
- Your app is live and running on Azure, connected to the provisioned resources.
- What it does:
-
Manage environments
azd env list azd env select <env-name> azd env new <env-name>
- What it does:
- Lets you create, list, and switch between multiple environments (e.g., dev, test, prod).
- Each environment has its own Azure resources and configuration.
- Result:
- You can easily manage separate deployments for different stages or teams, with isolated resources and settings.
- What it does:
azd init # Set up your project (choose template, name, etc.)
azd provision # Create Azure resources defined in your IaC files
azd deploy # Deploy your app code to Azure
azd monitor # (Optional) Monitor your app and resources- azd works well with Bicep, ARM templates, and other Azure IaC tools.
- You can use azd to set up CI/CD pipelines and manage secrets.
- azd is designed for rapid, repeatable, and secure cloud-native development on Azure.
This nice guide was created by GitHub Copilot, after a few prompts.
If you need a hands-on walkthrough or have specific questions about azd, just ask! - GitHub Copilot said.