Skip to content

Commit

Permalink
Merge pull request #6820 from MicrosoftDocs/main
Browse files Browse the repository at this point in the history
1/21/2025 AM Publish
  • Loading branch information
Taojunshen authored Jan 21, 2025
2 parents 98b8255 + 3ef9e23 commit aba1da3
Show file tree
Hide file tree
Showing 50 changed files with 364 additions and 268 deletions.
6 changes: 4 additions & 2 deletions articles/azure-developer-cli/TOC.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@
items:
- name: Install or update azd
href: install-azd.md
- name: What are Azure Developer CLI templates?
href: azd-templates.md
- name: Quickstart - Deploy an azd template
href: get-started.md
- name: What are Azure Developer CLI commands?
href: azd-commands.md
- name: What are Azure Developer CLI templates?
href: azd-templates.md
- name: Supported languages and environments
href: supported-languages-environments.md
- name: Deployment
Expand Down
94 changes: 94 additions & 0 deletions articles/azure-developer-cli/azd-commands.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
---
title: Azure Developer CLI commands overview
description: This article provides a conceptual overview of key concepts for Azure Developer CLI commands
ms.topic: conceptual
ms.date: 01/15/2025
---

# Azure Developer CLI commands overview

The Azure Developer CLI (`azd`) is designed to streamline the end-to-end developer workflow on Azure. `azd` provides high-level commands that act as abstractions to simplify common developer tasks such as project initialization, infrastructure provisioning, code deployment, and monitoring. `azd` commands are available in the terminal, an integrated development environment (IDE), or through CI/CD (continuous integration/continuous deployment) pipelines. In this article, you'll learn about the following:

- Essential `azd` command concepts
- How `azd` commands compare to other tools
- The relationship between `azd` commands and templates
- Common `azd` commands and which development tasks they accelerate

> [!NOTE]
> Visit the [Deploy an Azure Developer CLI template](/azure/developer/azure-developer-cli/get-started) quickstart to explore a sample `azd` command workflow in more detail.
## Compare Azure Developer CLI commands

The emphasis on high-level development stages differentiates `azd` commands from other command-line tools such as the Azure CLI or Azure PowerShell. Whereas those tools provide numerous commands for granular control over individual Azure resources and configurations, `azd` provides fewer, broader commands to automate higher-level development tasks such as provisioning multiple resources or deploying multiple services at once.

The following table highlights the differences between a sample `azd` command and other Azure command-line tools. Note that the `azd provision` command performs numerous tasks at once, and does not have a direct equivalent in these other tools. Many Azure CLI or PowerShell commands would be required to accomplish the same task.

| Tool | Sample Command | Outcome |
|---------------------|------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------|
| Azure Developer CLI | `azd provision` | Provisions multiple Azure resources required for an app based on project resources and configurations, such as an Azure resource group, an Azure App Service web app and app service plan, an Azure Storage account, and an Azure Key Vault. |
| Azure CLI | `az webapp create --resource-group myResourceGroup --plan myAppServicePlan --name myWebApp` | Provisions a new web app in the specified resource group and app service plan. |
| Azure PowerShell | `New-AzWebApp -ResourceGroupName "myResourceGroup" -Name "myWebApp" -AppServicePlan "myAppServicePlan"` | Provisions a new web app in the specified resource group and app service plan. |

## Azure Developer CLI commands and templates

`azd` commands are able to perform broader workflow tasks due in-part to their integration with the `azd` template system. [Azure Developer CLI templates](/azure/developer/azure-developer-cli/azd-templates) are code projects that adhere to `azd` structural conventions and include sample application code, infrastructure files, and configuration files. Most `azd` templates include the following:

- **`.azure` folder** - Contains essential Azure configurations and environment variables, such as the location to deploy resources or other subscription information.
- **`infra` folder** - Contains all of the Bicep or Terraform infrastructure-as-code files for the `azd` template.
- **`src` folder** - Contains all of the deployable app source code.
- **`azure.yaml` file** - A configuration file that defines one or more services in your project and maps them to Azure resources defined in the `infra` folder for deployment.

:::image type="content" source="media/make-azd-compatible/azd-template-structure.png" alt-text="A screenshot showing an Azure Developer CLI template structure.":::

Without `azd` commands, these templates are just standard code repositories. Essentially, `azd` templates serve as foundational blueprints, while CLI commands act as the engine driving deployment, management, and monitoring of your applications. `azd` commands use the assets in these templates to perform various tasks.

Using the preceding template as an example:

- The `azd provision` command creates resources in Azure using the infrastructure-as-code files in the `infra` folder of a template.
- The `azd deploy` command deploys an app or service defined in the `src` folder.

> [!NOTE]
> `azd` can also create and manage some Azure resources without the need to define infrastructure-as-code templates manually using the new [`azd compose`](/azure/developer/azure-developer-cli/azd-compose) feature, which is currently in alpha.
## Explore common commands

The following sections provide an overview of some of the most common `azd` commands to provide examples of working with templates and different development tasks.

> [!NOTE]
> For a complete list of `azd` commands and their parameters, visit the [Azure Developer CLI reference](/azure/developer/azure-developer-cli/reference) page.
### Initialize and run a template

- **`azd init`**: Initializes an existing `azd` template or creates and initializes a new template. This command essentially sets up the necessary files and directories to start working with `azd`.
- **`azd up`**: A convenience command to provision, package, and deploy all of your app resources in one command. This command is the equivalent of running `azd provision`, `azd package`, and `azd deploy` individually.

### Infrastructure Provisioning

- **`azd provision`**: Provisions the required Azure resources such as Azure Container App instances or Azure Storage accounts based on infrastructure-as-code templates or resources defined in `azure.yaml`.

### Code Deployment

- **`azd package`**: Packages the application's code to be deployed to Azure.
- **`azd deploy`**: Deploys your application code to the resources created by the `azd provision` command.

### Monitoring and Management

- **`azd monitor`**: Provides insights into the health and performance of the deployed application

### CI/CD Pipeline Configuration

- **`azd pipeline config`**: Configures a CI/CD pipeline for the project. This command sets up continuous integration and continuous deployment pipelines to automate the build and deployment processes.

### Environment Management

- **`azd env list`**: Lists all the different environments (e.g., development, staging, production) that have been set up for the template.
- **`azd env new`**: Creates a new environment with its own configuration and resources, allowing you to manage multiple environments for different stages of development.

### Resource Cleanup

- **`azd down`**: Deletes the Azure resources created by the template to clean up your environment and avoid unnecessary costs.

## Next steps

> [!div class="nextstepaction"]
> [What are Azure Developer CLI templates?](./azd-templates.md)
6 changes: 3 additions & 3 deletions articles/includes/dotnet-all.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
| Key Vault - Keys | NuGet [4.7.0](https://www.nuget.org/packages/Azure.Security.KeyVault.Keys/4.7.0) | [docs](/dotnet/api/overview/azure/Security.KeyVault.Keys-readme) | GitHub [4.7.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Security.KeyVault.Keys_4.7.0/sdk/keyvault/Azure.Security.KeyVault.Keys/) |
| Key Vault - Secrets | NuGet [4.7.0](https://www.nuget.org/packages/Azure.Security.KeyVault.Secrets/4.7.0) | [docs](/dotnet/api/overview/azure/Security.KeyVault.Secrets-readme) | GitHub [4.7.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Security.KeyVault.Secrets_4.7.0/sdk/keyvault/Azure.Security.KeyVault.Secrets/) |
| Language Text | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.AI.Language.Text/1.0.0-beta.2) | [docs](/dotnet/api/overview/azure/AI.Language.Text-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.Language.Text_1.0.0-beta.2/sdk/cognitivelanguage/Azure.AI.Language.Text/) |
| Load Testing | NuGet [1.0.1](https://www.nuget.org/packages/Azure.Developer.LoadTesting/1.0.1) | [docs](/dotnet/api/overview/azure/Developer.LoadTesting-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Developer.LoadTesting_1.0.1/sdk/loadtestservice/Azure.Developer.LoadTesting/) |
| Load Testing | NuGet [1.0.2](https://www.nuget.org/packages/Azure.Developer.LoadTesting/1.0.2) | [docs](/dotnet/api/overview/azure/Developer.LoadTesting-readme) | GitHub [1.0.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Developer.LoadTesting_1.0.2/sdk/loadtestservice/Azure.Developer.LoadTesting/) |
| Maps Common | NuGet [1.0.0-beta.4](https://www.nuget.org/packages/Azure.Maps.Common/1.0.0-beta.4) | [docs](/dotnet/api/overview/azure/Maps.Common-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.4](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Maps.Common_1.0.0-beta.4/sdk/maps/Azure.Maps.Common/) |
| Maps Geolocation | NuGet [1.0.0-beta.3](https://www.nuget.org/packages/Azure.Maps.Geolocation/1.0.0-beta.3) | [docs](/dotnet/api/overview/azure/Maps.Geolocation-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Maps.Geolocation_1.0.0-beta.3/sdk/maps/Azure.Maps.Geolocation/) |
| Maps Render | NuGet [2.0.0-beta.1](https://www.nuget.org/packages/Azure.Maps.Rendering/2.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Maps.Rendering-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [2.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Maps.Rendering_2.0.0-beta.1/sdk/maps/Azure.Maps.Rendering/) |
Expand Down Expand Up @@ -95,7 +95,7 @@
| Question Answering | NuGet [1.1.0](https://www.nuget.org/packages/Azure.AI.Language.QuestionAnswering/1.1.0) | [docs](/dotnet/api/overview/azure/AI.Language.QuestionAnswering-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.Language.QuestionAnswering_1.1.0/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering/) |
| Schema Registry | NuGet [1.4.0](https://www.nuget.org/packages/Azure.Data.SchemaRegistry/1.4.0) | [docs](/dotnet/api/overview/azure/Data.SchemaRegistry-readme) | GitHub [1.4.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Data.SchemaRegistry_1.4.0/sdk/schemaregistry/Azure.Data.SchemaRegistry/) |
| Schema Registry - Avro | NuGet [1.0.1](https://www.nuget.org/packages/Microsoft.Azure.Data.SchemaRegistry.ApacheAvro/1.0.1) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.Data.SchemaRegistry.ApacheAvro-readme) | GitHub [1.0.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Data.SchemaRegistry.ApacheAvro_1.0.1/sdk/schemaregistry/Microsoft.Azure.Data.SchemaRegistry.ApacheAvro/) |
| Service Bus | NuGet [7.18.2](https://www.nuget.org/packages/Azure.Messaging.ServiceBus/7.18.2) | [docs](/dotnet/api/overview/azure/Messaging.ServiceBus-readme) | GitHub [7.18.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Messaging.ServiceBus_7.18.2/sdk/servicebus/Azure.Messaging.ServiceBus/) |
| Service Bus | NuGet [7.18.3](https://www.nuget.org/packages/Azure.Messaging.ServiceBus/7.18.3) | [docs](/dotnet/api/overview/azure/Messaging.ServiceBus-readme) | GitHub [7.18.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Messaging.ServiceBus_7.18.3/sdk/servicebus/Azure.Messaging.ServiceBus/) |
| Storage - Blobs | NuGet [12.23.0](https://www.nuget.org/packages/Azure.Storage.Blobs/12.23.0) | [docs](/dotnet/api/overview/azure/Storage.Blobs-readme) | GitHub [12.23.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Storage.Blobs_12.23.0/sdk/storage/Azure.Storage.Blobs/) |
| Storage - Blobs Batch | NuGet [12.20.0](https://www.nuget.org/packages/Azure.Storage.Blobs.Batch/12.20.0) | [docs](/dotnet/api/overview/azure/Storage.Blobs.Batch-readme) | GitHub [12.20.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Storage.Blobs.Batch_12.20.0/sdk/storage/Azure.Storage.Blobs.Batch/) |
| Storage - Blobs ChangeFeed | NuGet [12.0.0-preview.52](https://www.nuget.org/packages/Azure.Storage.Blobs.ChangeFeed/12.0.0-preview.52) | [docs](/dotnet/api/overview/azure/Storage.Blobs.ChangeFeed-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [12.0.0-preview.52](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Storage.Blobs.ChangeFeed_12.0.0-preview.52/sdk/storage/Azure.Storage.Blobs.ChangeFeed/) |
Expand Down Expand Up @@ -306,7 +306,7 @@
| Resource Management - Purview | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.Purview/1.1.0)<br>NuGet [1.2.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.Purview/1.2.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Purview-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Purview_1.1.0/sdk/purview/Azure.ResourceManager.Purview/)<br>GitHub [1.2.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Purview_1.2.0-beta.1/sdk/purview/Azure.ResourceManager.Purview/) |
| Resource Management - Quantum | NuGet [1.0.0-beta.5](https://www.nuget.org/packages/Azure.ResourceManager.Quantum/1.0.0-beta.5) | [docs](/dotnet/api/overview/azure/ResourceManager.Quantum-readme?view=azure-dotnet-preview&amp;preserve-view=true) | GitHub [1.0.0-beta.5](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Quantum_1.0.0-beta.5/sdk/quantum/Azure.ResourceManager.Quantum/) |
| Resource Management - Qumulo | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.Qumulo/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Qumulo-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Qumulo_1.1.0/sdk/qumulo/Azure.ResourceManager.Qumulo/) |
| Resource Management - Quota | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Quota/1.0.0)<br>NuGet [1.1.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.Quota/1.1.0-beta.2) | [docs](/dotnet/api/overview/azure/ResourceManager.Quota-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Quota_1.0.0/sdk/quota/Azure.ResourceManager.Quota/)<br>GitHub [1.1.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Quota_1.1.0-beta.2/sdk/quota/Azure.ResourceManager.Quota/) |
| Resource Management - Quota | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.Quota/1.0.0)<br>NuGet [1.1.0-beta.3](https://www.nuget.org/packages/Azure.ResourceManager.Quota/1.1.0-beta.3) | [docs](/dotnet/api/overview/azure/ResourceManager.Quota-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Quota_1.0.0/sdk/quota/Azure.ResourceManager.Quota/)<br>GitHub [1.1.0-beta.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Quota_1.1.0-beta.3/sdk/quota/Azure.ResourceManager.Quota/) |
| Resource Management - Recovery Services | NuGet [1.1.1](https://www.nuget.org/packages/Azure.ResourceManager.RecoveryServices/1.1.1)<br>NuGet [1.2.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.RecoveryServices/1.2.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.RecoveryServices-readme) | GitHub [1.1.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.RecoveryServices_1.1.1/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/)<br>GitHub [1.2.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.RecoveryServices_1.2.0-beta.1/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/) |
| Resource Management - Recovery Services Backup | NuGet [1.2.0](https://www.nuget.org/packages/Azure.ResourceManager.RecoveryServicesBackup/1.2.0) | [docs](/dotnet/api/overview/azure/ResourceManager.RecoveryServicesBackup-readme) | GitHub [1.2.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.RecoveryServicesBackup_1.2.0/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/) |
| Resource Management - Recovery Services Data Replication | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.RecoveryServicesDataReplication/1.0.0-beta.2) | [docs](/dotnet/api/overview/azure/ResourceManager.RecoveryServicesDataReplication-readme?view=azure-dotnet-preview&amp;preserve-view=true) | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.RecoveryServicesDataReplication_1.0.0-beta.2/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/) |
Expand Down
Loading

0 comments on commit aba1da3

Please sign in to comment.