{"id":98630,"date":"2025-02-07T16:00:02","date_gmt":"2025-02-07T10:30:02","guid":{"rendered":"https:\/\/www.whizlabs.com\/blog\/?p=98630"},"modified":"2025-03-26T16:12:45","modified_gmt":"2025-03-26T10:42:45","slug":"azure-dev-workflows-with-azure-developer-cli","status":"publish","type":"post","link":"https:\/\/www.whizlabs.com\/blog\/azure-dev-workflows-with-azure-developer-cli\/","title":{"rendered":"Simplifying Azure Dev Workflows with the Azure Developer CLI"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">This blog explores how the <\/span><a title=\"AZ-900: Microsoft Azure Fundamentals\" href=\"https:\/\/www.whizlabs.com\/microsoft-azure-certification-az-900\/\" target=\"_blank\" rel=\"noopener\"><b>AZ-900: Microsoft Azure Fundamentals<\/b><\/a><span style=\"font-weight: 400;\"> certification helps developers manage cloud resources easily with its focus on the <\/span><b>Azure Developer CLI<\/b><span style=\"font-weight: 400;\">. Read through to learn how it simplifies workflows with text commands, making automation and monitoring effortless. Also know how it boosts productivity and streamlines project management, making Azure development more efficient.\u00a0<\/span><\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_76 ez-toc-wrap-left counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #ea7e02;color:#ea7e02\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #ea7e02;color:#ea7e02\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.whizlabs.com\/blog\/azure-dev-workflows-with-azure-developer-cli\/#Overview_of_Azure_Developer_CLI\" >Overview of Azure Developer CLI<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.whizlabs.com\/blog\/azure-dev-workflows-with-azure-developer-cli\/#Using_Azure_Developer_CLI\" >Using Azure Developer CLI<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.whizlabs.com\/blog\/azure-dev-workflows-with-azure-developer-cli\/#Initial_Configuration\" >Initial Configuration<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.whizlabs.com\/blog\/azure-dev-workflows-with-azure-developer-cli\/#Azure_Developer_CLI_Commands\" >Azure Developer CLI Commands<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.whizlabs.com\/blog\/azure-dev-workflows-with-azure-developer-cli\/#Core_Features_of_Azure_Developer_CLI\" >Core Features of Azure Developer CLI<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.whizlabs.com\/blog\/azure-dev-workflows-with-azure-developer-cli\/#Support_for_Workflow_Customization\" >Support for Workflow Customization<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.whizlabs.com\/blog\/azure-dev-workflows-with-azure-developer-cli\/#Azure_Developer_CLI_Templates\" >Azure Developer CLI Templates<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.whizlabs.com\/blog\/azure-dev-workflows-with-azure-developer-cli\/#Azure_Developer_CLI_Template_Contents\" >Azure Developer CLI Template Contents<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.whizlabs.com\/blog\/azure-dev-workflows-with-azure-developer-cli\/#Best_Practices\" >Best Practices<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.whizlabs.com\/blog\/azure-dev-workflows-with-azure-developer-cli\/#Conclusion\" >Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Overview_of_Azure_Developer_CLI\"><\/span><b>Overview of Azure Developer CLI<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">The Azure Developer CLI is a cross-platform command-line tool designed to facilitate various Azure development tasks. The following diagram shows the typical set-up of the Azure Developer CLI;\u00a0<\/span><\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-98633 size-full\" src=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2025\/02\/set-up-of-the-azure-developer-cli.webp\" alt=\"set up of the azure developer cli\" width=\"1536\" height=\"818\" srcset=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2025\/02\/set-up-of-the-azure-developer-cli.webp 1536w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2025\/02\/set-up-of-the-azure-developer-cli-300x160.webp 300w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2025\/02\/set-up-of-the-azure-developer-cli-1024x545.webp 1024w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2025\/02\/set-up-of-the-azure-developer-cli-768x409.webp 768w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2025\/02\/set-up-of-the-azure-developer-cli-150x80.webp 150w\" sizes=\"(max-width: 1536px) 100vw, 1536px\" \/><span style=\"font-weight: 400;\">\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">As shown in the diagram above, whether you are deploying applications, managing resources, or automating workflows, the Azure Developer CLI provides a unified interface to accomplish these tasks effortlessly as follows;\u00a0<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Code<\/b><span style=\"font-weight: 400;\">: Developers can write and structure applications while seamlessly integrating with other Azure services and development tools. It provides a variety of templates that are useful in creating new application projects.\u00a0<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Build<\/b><span style=\"font-weight: 400;\">: Azure Developer CLI allows developers to compile and package application artifacts while streamlining the entire SDLC through the mapping commands at various stages.\u00a0<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Deployment<\/b><span style=\"font-weight: 400;\">: The tool provides a repeatable path to cloud deployment while simplifying the deployment of applications to multiple environments (development, testing, production) through automation. The Azure Developer CLI streamlines the entire development lifecycle by mapping commands to critical stages.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Provision<\/b><span style=\"font-weight: 400;\">: With the Azure Developer CLI, developers can create and update Azure resources using the provisioning functionality. This allows for efficient and effective provisioning processes with the cloud environment.\u00a0<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><strong>Monitor<\/strong><span style=\"font-weight: 400;\"><span style=\"font-weight: 400;\"><span style=\"font-weight: 400;\"><strong>:<\/strong> Developers can also monitor applications running in Azure using the azd monitor capability. It provides developer-friendly monitoring commands that map closely with developer workflows. This allows developers to dedicate more time to crafting a unique code.<\/span><\/span><\/span><\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Using_Azure_Developer_CLI\"><\/span><b>Using Azure Developer CLI<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><b>Installation: <\/b><span style=\"font-weight: 400;\">To get started with the Azure Developer CLI, you need to install it on your local computer. The good thing is that the tool is available for Windows, macOS, and Linux. You simply download the installer from the official Azure website or use package managers like APT for Debian-based Linux distributions and Chocolatey for Windows Operating Systems (Oss). For instance;\u00a0<\/span><\/p>\n<ul>\n<li aria-level=\"1\"><b>For Linux<\/b><br \/>\nThe Linux distributions; you can install the <a style=\"font-size: 16px; font-weight: 400; background-color: #ffffff;\" title=\"Azure CLI\" href=\"https:\/\/learn.microsoft.com\/en-us\/cli\/azure\/\" target=\"_blank\" rel=\"nofollow noopener\"><strong>Azure CLI<\/strong><\/a><span style=\"font-size: 16px; font-weight: 400;\"> by running the following command:\u00a0<\/span><\/li>\n<\/ul>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">curl -fsSL https:\/\/aka.ms\/install-azd.sh | bash<\/span><\/span><\/li>\n<li aria-level=\"1\"><b>For Windows;<br \/>\n<\/b>For Windows environments, you simply use the following command to install;<\/li>\n<\/ul>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">winget install microsoft.azd<\/span><\/span><\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Initial_Configuration\"><\/span><b>Initial Configuration<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">After installing the Azure Developer CLI, the next step is to ensure that it is properly and securely configured configure by running the following command;<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">azd init -t hello-azd\u00a0<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">\u200dOnce you are successfully authenticated; you can now start using the Azure Developer CLI. The functionality will show information about your subscription. This means that if you have multiple Azure subscriptions, it becomes crucial to specify which one you want to use.<\/span><\/p>\n<p>&nbsp;<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Azure_Developer_CLI_Commands\"><\/span><b>Azure Developer CLI Commands<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Azure Developer CLI offers an incredible number of commands that allow you to interact with the Azure cloud environment. These include the following;\u00a0<\/span><\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-98634 size-full\" src=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2025\/02\/azure-developer-cli-commands.webp\" alt=\"azure developer cli commands\" width=\"1536\" height=\"897\" srcset=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2025\/02\/azure-developer-cli-commands.webp 1536w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2025\/02\/azure-developer-cli-commands-300x175.webp 300w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2025\/02\/azure-developer-cli-commands-1024x598.webp 1024w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2025\/02\/azure-developer-cli-commands-768x449.webp 768w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2025\/02\/azure-developer-cli-commands-150x88.webp 150w\" sizes=\"(max-width: 1536px) 100vw, 1536px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Core_Features_of_Azure_Developer_CLI\"><\/span><b>Core Features of Azure Developer CLI<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">The beauty about the <strong>Azure Developer<\/strong> CLI is that it allows you to interact with virtually all the Azure resources. To explain this let us look into some of the popular commands that you can use to streamline workflows<\/span><span style=\"font-weight: 400;\">;<\/span><\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-98637 size-full\" src=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2025\/02\/core-features-of-azure-developer-cli.webp\" alt=\"core features of azure developer cli\" width=\"1536\" height=\"411\" srcset=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2025\/02\/core-features-of-azure-developer-cli.webp 1536w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2025\/02\/core-features-of-azure-developer-cli-300x80.webp 300w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2025\/02\/core-features-of-azure-developer-cli-1024x274.webp 1024w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2025\/02\/core-features-of-azure-developer-cli-768x206.webp 768w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2025\/02\/core-features-of-azure-developer-cli-150x40.webp 150w\" sizes=\"(max-width: 1536px) 100vw, 1536px\" \/><\/p>\n<ul>\n<li><b>Environmental management<\/b><span style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">: It is important ot be able to manage Azure environments to secure effective workflows. The functionality allows you to manage resources efficiently and effectively. The following command is used in managing environments using Azure Developer CLI;<\/span><\/span><\/li>\n<li><span style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">azd env<\/span><\/span><\/li>\n<li><b>Deployment automation: <\/b><span style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Automating deployments is a critical aspect of modern development workflows and the Azure Developer CLI allows you to deploy applications using templates and scripts, ensuring consistency and reducing the chances of human error. The following code is used to automate web application deployments;<\/span><\/span><\/li>\n<li><span style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">azd deploy<\/span><\/span><\/li>\n<li><b>Monitoring and diagnostics: <\/b><span style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Keeping track of your resources and applications is vital for maintaining their health and performance. The Azure Developer CLI provides commands to monitor usage, diagnose issues, and analyze logs. For example;<\/span><\/span><\/li>\n<li><span style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">azd monitor<\/span><\/span><\/li>\n<li><b>Integration with<a title=\"CI\/CD Pipelines\" href=\"https:\/\/learn.microsoft.com\/en-us\/azure\/devops\/pipelines\/apps\/cd\/azure\/cicd-data-overview?view=azure-devops\" target=\"_blank\" rel=\"nofollow noopener\"> CI\/CD Pipelines:<\/a> Azure Developer CI supports <\/b><span style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Continuous Integration and Continuous Deployment (CI\/CD) practices and a variety of languages including Python and .NET. This enables developers to automatically build and deploy pipelines. The following command is used to deploy pipelines;<\/span><\/span><\/li>\n<li><span style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">azd pipeline<\/span><\/span><\/li>\n<li><b>Delete Azure resources<\/b><span style=\"font-weight: 400;\">: Sometimes developers are faced with the option of deleting provisioned Azure resources for their application This following Azure Developer command can delete such resources;\u00a0\u00a0<\/span><\/li>\n<li><span style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">azd down<\/span><\/span><\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Support_for_Workflow_Customization\"><\/span><b>Support for Workflow Customization<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">The following functionalities of Azure Developer CLI can be ser to further simplify the workflows though customization processes;\u00a0<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Hooks<\/b><span style=\"font-weight: 400;\">: The Azure Developer CLI supports various extension points to customize your workflows and deployments. The hooks middleware allows developers to execute custom scripts before and after\u00a0azd\u00a0commands and service lifecycle events. Note that hooks follow a naming convention using\u00a0<\/span><i><span style=\"font-weight: 400;\">pre<\/span><\/i><span style=\"font-weight: 400;\">\u00a0and\u00a0<\/span><i><span style=\"font-weight: 400;\">post<\/span><\/i><span style=\"font-weight: 400;\">\u00a0prefixes on the matching\u00a0azd\u00a0command or service event name. The following are some examples;<\/span>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><b>Prerestore\u00a0and\u00a0post restore<\/b><span style=\"font-weight: 400;\">: These run before and after package dependencies are restored.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><b>Preprovision\u00a0and\u00a0post provision<\/b><span style=\"font-weight: 400;\">: These run before and after Microsoft Azure resources are created.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><b>Predeploy\u00a0and\u00a0post deploy<\/b><span style=\"font-weight: 400;\">: These are programmed to run before and after the application code is deployed to Microsoft Azure.<\/span><\/li>\n<\/ul>\n<\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Service registration: <\/b><span style=\"font-weight: 400;\">You can also configure hooks to<\/span> <span style=\"font-weight: 400;\">run only for specific services defined in your\u00a0.yaml\u00a0file.<\/span> <span style=\"font-weight: 400;\">The service directory is used as the default\u00a0cwd\u00a0for service hooks. It refers to the same path that is defined in the azure.yaml file representing the project property of the service configuration<\/span><span style=\"font-weight: 400;\">.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Bicep<\/b><span style=\"font-weight: 400;\">: Azure Developer CLI\u00a0uses Bicep by default to\u00a0generate files you can then inspect and edit. This means that if you feel there\u00a0are things missing, you can adjust to the generated files before starting the deployment. The Bicep file in question:<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">&#8216;azd-custom-01&#8217;\u00a0<\/span><\/p>\n<ul>\n<li aria-level=\"1\"><b>Compose: <\/b><span style=\"font-weight: 400;\">The Azure Developer CLI compose feature enables you to progressively compose the Azure resources required for your app without manually writing Bicep code. It introduces an option to add Azure resources to your apps and is useful for developers who want to avoid writing Bicep or using an existing template. The\u00a0Azure Developer CLI compose\u00a0feature supports process of adding resources to the following Azure Services<\/span><span style=\"font-weight: 400;\">:<\/span><\/li>\n<\/ul>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\">Azure Container Apps<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\">Azure OpenAI with Microsoft Entra ID authentication<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\">Azure Cosmos DB for MongoDB<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\"><span style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Azure Cosmos DB for PostgreSQL<\/span><\/span><\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Azure_Developer_CLI_Templates\"><\/span><b>Azure Developer CLI Templates<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Azure Developer CLI comprises a rich curated library of templates to provide developers with a starting point that fits their project&#8217;s needs and ensure a rapid and reliable transition from code to cloud as follows;<\/span><\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-98635 size-full\" src=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2025\/02\/azure-developer-cli-compose-feature.webp\" alt=\"azure developer cli templates\" width=\"1536\" height=\"895\" srcset=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2025\/02\/azure-developer-cli-compose-feature.webp 1536w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2025\/02\/azure-developer-cli-compose-feature-300x175.webp 300w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2025\/02\/azure-developer-cli-compose-feature-1024x597.webp 1024w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2025\/02\/azure-developer-cli-compose-feature-768x448.webp 768w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2025\/02\/azure-developer-cli-compose-feature-150x87.webp 150w\" sizes=\"(max-width: 1536px) 100vw, 1536px\" \/><\/p>\n<p><span style=\"font-weight: 400;\"><strong>Source:<\/strong> Ostrowski, Savannah. \u201c<\/span><i><span style=\"font-weight: 400;\">Introducing the Azure Developer CLI (Azd): A Faster Way to Build Apps for the Cloud<\/span><\/i><span style=\"font-weight: 400;\">.\u201d <\/span><\/p>\n<p><span style=\"font-weight: 400;\">An important point to note regarding the Azure Developer CLI \u00a0templates is that they all follow a structured pattern as detailed below:<\/span><\/p>\n<ul>\n<li><b>infra\u00a0folder: <\/b><span style=\"font-weight: 400;\">The infra folder contains all the Bicep or Terraform infrastructure-as-code (IaC) files that\u00a0azd\u00a0executes to create Azure resources required to host the application such as templates. One good aspect about infra folders is that developers are not required to include these in their templates thus simplifying development workflows.<\/span><\/li>\n<li><b>azure.yaml\u00a0file: The azure.yaml file is a configuration file<\/b><span style=\"font-weight: 400;\"> that defines one or more services in a developer\u2019s project. It then maps these services to Azure resources for deployment. For example, a developer might want to define an API service and a web front-end service. Each of these will have attributes that map them to different Azure resources for deployment.\u00a0<\/span><\/li>\n<li><b>.azure\u00a0folder<\/b><span style=\"font-weight: 400;\">: This folder contains all the configurations and variables such as\u00a0 deployment locations and environment aspects that exist in the Azure developer environment. The functionality facilitates the deployment of Azure resources and other subscription information throughout the developer environment.<\/span><\/li>\n<li><b>src\u00a0folder<\/b><span style=\"font-weight: 400;\">: The src folder contains all app service code that can be deployed in the Azure environment. Note that some azd templates only provide infrastructure assets and leave the src directory empty. In this case you need to add your\u00a0 own application code to facilitate deployment.<\/span><\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Azure_Developer_CLI_Template_Contents\"><\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>Azure Developer CLI Template Contents<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">The following contents of the Azure Developer CLI assist in simplifying the development workflows as well;<\/span><\/p>\n<ul>\n<li aria-level=\"1\"><b>Development Containers: <\/b><span style=\"font-weight: 400;\">The Azure Developer CLI templates include support for development containers. These are fully featured development environments built on Docker containers. They allow developers to easily to set up consistent development environments across teams while assisting in avoiding compatibility issues.\u00a0<\/span><\/li>\n<\/ul>\n<ul>\n<li aria-level=\"1\"><b>Pipelines as Code: <\/b><span style=\"font-weight: 400;\">Each<\/span> <span style=\"font-weight: 400;\">Azure Developer CLI template contains a default <a title=\"CI\/CD Pipeline\" href=\"https:\/\/www.whizlabs.com\/aws-ci-cd-pipeline-master-class\/\" target=\"_blank\" rel=\"noopener\"><strong>CI\/CD pipeline<\/strong><\/a> as code supporting Azure DevOps or GitHub Actions. This functionality can be further configured by running a pipeline config command. Once the pipeline is appropriately configured, developers can automatically deploy and provision new changes to the project or infrastructure any time as changes are pushed to repositories.\u00a0<\/span><\/li>\n<li aria-level=\"1\"><b>Infrastructure as Code: <\/b><span style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">The Azure Developer CLI templates also support Infrastructure as code (IaC) through the use of the Bicep or Terraform functionalities. The templates include core IaC modules that are used to represent a wide range of Azure services. This capability greatly reduces the effort required by developers to create and maintain IaC thereby assisting in simplifying developer workflows.<\/span><\/span><\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Best_Practices\"><\/span><b>Best Practices<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">The following best practices should be used when using Azure Developer CLI to achieve the required results simplifying developer workflows;\u00a0<\/span><\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-98636 size-full\" src=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2025\/02\/best-practices-of-using-azure-developer-cli.webp\" alt=\"best practices of using azure developer cli\" width=\"1536\" height=\"411\" srcset=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2025\/02\/best-practices-of-using-azure-developer-cli.webp 1536w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2025\/02\/best-practices-of-using-azure-developer-cli-300x80.webp 300w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2025\/02\/best-practices-of-using-azure-developer-cli-1024x274.webp 1024w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2025\/02\/best-practices-of-using-azure-developer-cli-768x206.webp 768w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2025\/02\/best-practices-of-using-azure-developer-cli-150x40.webp 150w\" sizes=\"(max-width: 1536px) 100vw, 1536px\" \/><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Maintain consistency in resource naming<\/b><span style=\"font-weight: 400;\">: Use a consistent naming convention for your resources to avoid confusion and make management easier. Consider including the project name, environment, and resource type in the naming conventions.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Use secure configuration files<\/b><span style=\"font-weight: 400;\">: Leverage configuration files to store parameters and settings for your deployments. These configuration files allow developers to easily make changes as required without affecting the developer environment.\u00a0<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Use modular templates<\/b><span style=\"font-weight: 400;\">: Leverage Azure Developer CLI templates to structure infrastructure and application components modularity. This action assists in enabling\u00a0 reusability while ensuring consistency across projects in the Azure environment.\u00a0<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Automate monitoring<\/b><span style=\"font-weight: 400;\">: Incorporating monitoring functionalities such as the Azure Monitor and Application Insights into Azure Developer CLI operations allows developers to gain visibility into application performance. This allows for the effective allocation and simplification of developer workflows.\u00a0<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Secure the supply chain<\/b><span style=\"font-weight: 400;\"><span style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">: It is also crucial to integrate Azure Developer CLI with security features such as the Azure Key Vault and managed identities. This approach enhances security across deployments.<\/span><\/span><\/span><\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span><b>Conclusion<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">This blog talks about how Azure Developer CLI provides an effective process that streamlines developer workflows in Azure. The tool represents a crucial improvement in simplifying application and infrastructure deployment in Azure developer environments. By using all the functionalities of Azure Developer CLI, developers can reduce the time-to-market of their products while also enhancing the security and productivity aspects of their development processes. Get access to <\/span><a title=\"hands-on-labs\" href=\"https:\/\/www.whizlabs.com\/hands-on-labs\/\" target=\"_blank\" rel=\"noopener\"><b>hands-on labs<\/b><\/a><span style=\"font-weight: 400;\"> and <\/span><a title=\"sandboxes\" href=\"https:\/\/www.whizlabs.com\/cloud-sandbox\/\" target=\"_blank\" rel=\"noopener\"><b>sandboxes<\/b><\/a><span style=\"font-weight: 400;\"> with Whizlabs cloud resources. Talk to our experts in case of queries!<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This blog explores how the AZ-900: Microsoft Azure Fundamentals certification helps developers manage cloud resources easily with its focus on the Azure Developer CLI. Read through to learn how it simplifies workflows with text commands, making automation and monitoring effortless. Also know how it boosts productivity and streamlines project management, making Azure development more efficient.\u00a0 Overview of Azure Developer CLI The Azure Developer CLI is a cross-platform command-line tool designed to facilitate various Azure development tasks. The following diagram shows the typical set-up of the Azure Developer CLI;\u00a0 \u00a0 As shown in the diagram above, whether you are deploying applications, [&hellip;]<\/p>\n","protected":false},"author":439,"featured_media":98639,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"default","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[15],"tags":[349,5251],"class_list":["post-98630","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-microsoft-azure","tag-azure","tag-azure-fundamentals"],"uagb_featured_image_src":{"full":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2025\/02\/simplifying-azure-dev-workflows-with-the-azure-developer-cli.webp",1536,864,false],"thumbnail":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2025\/02\/simplifying-azure-dev-workflows-with-the-azure-developer-cli-150x150.webp",150,150,true],"medium":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2025\/02\/simplifying-azure-dev-workflows-with-the-azure-developer-cli-300x169.webp",300,169,true],"medium_large":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2025\/02\/simplifying-azure-dev-workflows-with-the-azure-developer-cli-768x432.webp",768,432,true],"large":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2025\/02\/simplifying-azure-dev-workflows-with-the-azure-developer-cli-1024x576.webp",1024,576,true],"1536x1536":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2025\/02\/simplifying-azure-dev-workflows-with-the-azure-developer-cli.webp",1536,864,false],"2048x2048":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2025\/02\/simplifying-azure-dev-workflows-with-the-azure-developer-cli.webp",1536,864,false],"profile_24":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2025\/02\/simplifying-azure-dev-workflows-with-the-azure-developer-cli-24x24.webp",24,24,true],"profile_48":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2025\/02\/simplifying-azure-dev-workflows-with-the-azure-developer-cli-48x48.webp",48,48,true],"profile_96":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2025\/02\/simplifying-azure-dev-workflows-with-the-azure-developer-cli-96x96.webp",96,96,true],"profile_150":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2025\/02\/simplifying-azure-dev-workflows-with-the-azure-developer-cli-150x150.webp",150,150,true],"profile_300":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2025\/02\/simplifying-azure-dev-workflows-with-the-azure-developer-cli-300x300.webp",300,300,true],"tptn_thumbnail":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2025\/02\/simplifying-azure-dev-workflows-with-the-azure-developer-cli-250x250.webp",250,250,true],"web-stories-poster-portrait":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2025\/02\/simplifying-azure-dev-workflows-with-the-azure-developer-cli-640x853.webp",640,853,true],"web-stories-publisher-logo":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2025\/02\/simplifying-azure-dev-workflows-with-the-azure-developer-cli-96x96.webp",96,96,true],"web-stories-thumbnail":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2025\/02\/simplifying-azure-dev-workflows-with-the-azure-developer-cli-150x84.webp",150,84,true]},"uagb_author_info":{"display_name":"Suneel Moopanar","author_link":"https:\/\/www.whizlabs.com\/blog\/author\/suneel-moopanar\/"},"uagb_comment_info":12,"uagb_excerpt":"This blog explores how the AZ-900: Microsoft Azure Fundamentals certification helps developers manage cloud resources easily with its focus on the Azure Developer CLI. Read through to learn how it simplifies workflows with text commands, making automation and monitoring effortless. Also know how it boosts productivity and streamlines project management, making Azure development more efficient.\u00a0&hellip;","_links":{"self":[{"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/posts\/98630","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/users\/439"}],"replies":[{"embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/comments?post=98630"}],"version-history":[{"count":12,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/posts\/98630\/revisions"}],"predecessor-version":[{"id":98656,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/posts\/98630\/revisions\/98656"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/media\/98639"}],"wp:attachment":[{"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/media?parent=98630"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/categories?post=98630"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/tags?post=98630"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}