{"id":2752,"date":"2023-07-12T14:44:37","date_gmt":"2023-07-12T21:44:37","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/azure-sdk\/?p=2752"},"modified":"2023-07-14T08:40:58","modified_gmt":"2023-07-14T15:40:58","slug":"azure-developer-cli-azd-july-2023-release","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/azure-sdk\/azure-developer-cli-azd-july-2023-release\/","title":{"rendered":"Azure Developer CLI (azd) &#8211; July 2023 Release"},"content":{"rendered":"<p>We&#8217;re pleased to announce that the July 2023 release (<code>1.1.0<\/code>) of the Azure Developer CLI (<code>azd<\/code>) is now available. As always, you can learn about how to get started with the Azure Developer CLI by visiting our <a href=\"https:\/\/aka.ms\/azd\">official documentation<\/a>.<\/p>\n<p>In case you missed it, <a href=\"https:\/\/devblogs.microsoft.com\/azure-sdk\/azd-ga-announcement\/\">the Azure Developer CLI reached stable<\/a> at Microsoft Build in May!<\/p>\n<p>Here&#8217;s what&#8217;s new in <code>azd<\/code> since our May release:<\/p>\n<ul>\n<li>Support for resource group-scoped deployments (<a href=\"https:\/\/github.com\/Azure\/azure-dev\/pull\/2083\">azure-dev#2083<\/a>)<\/li>\n<li>View reference documentation more quickly with <code>--docs<\/code> (<a href=\"https:\/\/github.com\/Azure\/azure-dev\/issues\/1433\">azure-dev#1433<\/a>)<\/li>\n<li><code>azd<\/code> GitHub Action now in the marketplace (<a href=\"https:\/\/github.com\/Azure\/azure-dev\/issues\/2207\">azure-dev#2207<\/a>)<\/li>\n<li><code>azd<\/code> as a Dev Container feature (<a href=\"https:\/\/github.com\/Azure\/azure-dev\/pull\/1118\">azure-dev#1118<\/a>)<\/li>\n<li>ARM native builds of <code>azd<\/code> (<a href=\"https:\/\/github.com\/Azure\/azure-dev\/pull\/2275\">azure-dev#2275<\/a>)<\/li>\n<li>Visual Studio Code updates:\n<ul>\n<li><code>azure.yaml<\/code> diagnostics for invalid paths (<a href=\"https:\/\/github.com\/Azure\/azure-dev\/issues\/1388\">azure-dev#1388<\/a>)<\/li>\n<li><code>azure.yaml<\/code> rename refactoring for folder updates(<a href=\"https:\/\/github.com\/Azure\/azure-dev\/issues\/1389\">azure-dev#1389<\/a>)<\/li>\n<li>Drag-and-drop add services to your <code>azure.yaml<\/code> (<a href=\"https:\/\/github.com\/Azure\/azure-dev\/pull\/2448\">azure-dev#2448<\/a>)<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2>Resource group-scoped deployments<\/h2>\n<p>As of the <code>1.1.0<\/code> release, we&#8217;ve expanded our deployment scopes to include resource groups for Bicep. Prior to this release, <code>azd<\/code> only supported subscription scope deployments.<\/p>\n<p>In order to use resource group scoped deployments, you need to enable this feature in the CLI using the following command as all features <a href=\"https:\/\/devblogs.microsoft.com\/azure-sdk\/azd-april-2023-release\/#alpha-beta-and-stable-features\">now start in alpha stage<\/a>.<\/p>\n<pre><code>azd config set alpha.resourceGroupDeployments on<\/code><\/pre>\n<p>When running <code>azd provision<\/code> or <code>azd up<\/code> on a repository with resource group scope infrastructure as code, you&#8217;ll now be prompted to create a new resource group or select an existing resource group by name to provision to.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-content\/uploads\/sites\/58\/2023\/07\/2023-07-11-azd-resourcegroupdeployments.gif\" alt=\"A GIF of the new provision workflow where you can select or create a resource group\" \/><\/p>\n<h2>Reference documentation more quickly with <code>--docs<\/code><\/h2>\n<p>To make jumping to <code>azd<\/code> documentation simpler, we&#8217;ve added a new <code>--docs<\/code> flag on all commands! Now, when you run something like <code>azd deploy --docs<\/code>, a browser tab opens and jumps straight to <a href=\"https:\/\/learn.microsoft.com\/azure\/developer\/azure-developer-cli\/reference#azd-deploy\">the reference documentation<\/a> for <code>deploy<\/code>. From there, you can explore any other Azure Developer CLI documentation you might need \u2014 no URL required!<\/p>\n<h2><code>azd<\/code> as a GitHub Action<\/h2>\n<p>Previously, to use the Azure Developer CLI in a GitHub Action, you were required to &#8220;manually&#8221; install <code>azd<\/code> via <code>curl<\/code> or use a bulky <a href=\"https:\/\/github.com\/Azure\/azure-dev\/issues\/2206\">all-in-one image<\/a> that potentially included more dependencies than you needed (for example, language runtime dependencies). This requirement resulted in a slow start time for pipeline runs as the image was large. The image also included many dependencies that may be irrelevant to your application. For example, if I&#8217;m using a Python and React template, I may not need or want Java installed, or vice versa.<\/p>\n<p>As of this release, we&#8217;ve published <code>azd<\/code> as a GitHub Action. Similar to other familiar <code>setup-*<\/code> GitHub Actions, you can now find <code>setup-azd<\/code> in the <a href=\"https:\/\/aka.ms\/azd-gha\">GitHub Actions Marketplace<\/a>. As part of your dependency setup in CI\/CD, you can now add the following to install <code>azd<\/code>.<\/p>\n<pre><code class=\"language-yaml\">\r\non: [push]\r\n\r\njobs:\r\n  build:\r\n    runs-on: ubuntu-latest\r\n    steps:\r\n      - name: Install azd\r\n        uses: Azure\/setup-azd@v0.1.0<\/code><\/pre>\n<h2><code>azd<\/code> as a Dev Container feature<\/h2>\n<p>As of this release, we have also shipped <code>azd<\/code> as a Dev Container feature! If you&#8217;re unfamiliar, <a href=\"https:\/\/containers.dev\/\">Development Containers<\/a> (or Dev Containers for short) allows you to use a container as a full-featured development environment. Dev Containers are a great way to streamline local development environment setup via configuration checked into source control.<\/p>\n<p>With our new <code>azd<\/code> <a href=\"https:\/\/containers.dev\/features\">Dev Container feature<\/a>, you can include the following to your <code>.devcontainer.json<\/code> to install the Azure Developer CLI:<\/p>\n<pre><code class=\"language-json\">\"features\": {\r\n  \"ghcr.io\/azure\/azure-dev\/azd:latest\": {}\r\n}<\/code><\/pre>\n<p>Alternatively, you can install the Remote Containers extension and add Dev Container configurations to your project using the following steps:<\/p>\n<ol>\n<li>&#8220;Control + Shift + P&#8221; (Windows) or &#8220;Command + Shift + P&#8221; (Mac) to open the Command Palette<\/li>\n<li>Type &#8220;Dev Containers: Add Dev Containers configuration files&#8230;&#8221;<\/li>\n<li>Select a predefined container definition<\/li>\n<li>Select a version<\/li>\n<li>Select features to install (for example &#8220;Azure Developer CLI&#8221;)<\/li>\n<\/ol>\n<p>At the end, you have a <code>.devcontainer<\/code> directory in your workspace with a <code>devcontainer.json<\/code> you can further modify.<\/p>\n<p>A special thank you to <a href=\"https:\/\/github.com\/aaronpowell\">aaronpowell<\/a> for their contributions to this feature and for updating our templates to use this new feature!<\/p>\n<h2>ARM native builds of <code>azd<\/code><\/h2>\n<p>We have made an important update to the <code>install-azd.sh<\/code> so now when you run the script with the <code>-a arm64<\/code> flag, it installs the Arm64 version of <code>azd<\/code> specifically.<\/p>\n<p>For example, this new support allows someone to install the ARM build of <code>azd<\/code> creating a Dev Container or Codespace:<\/p>\n<pre><code>curl -fsSL https:\/\/aka.ms\/install-azd.sh | bash -s -- -a $(dpkg --print-architecture)<\/code><\/pre>\n<p>If you don&#8217;t specify the <code>-a<\/code> flag, the script defaults to installing the amd64 version on macOS, and it fails on Linux, just like before.<\/p>\n<h2>Visual Studio Code updates<\/h2>\n<p>In this release, we&#8217;ve added many features to help make editing your <code>azure.yaml<\/code> file simpler.<\/p>\n<h3><code>azure.yaml<\/code> diagnostics for invalid paths<\/h3>\n<p>First, we have added diagnostics (for example, errors) to report when a folder referenced as a service in your <code>azure.yaml<\/code> doesn&#8217;t exist. Invalid paths are underlined in the file, and problems are listed in the Problems window to help ensure you have a valid configuration for <code>azd<\/code>.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-content\/uploads\/sites\/58\/2023\/07\/2023-07-11-azd-vscode-diagnostics.png\" alt=\"An error-level diagnostic under an incorrect path in azure.yaml\" \/>\n<img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-content\/uploads\/sites\/58\/2023\/07\/2023-07-11-azd-vscode-problems-window.png\" alt=\"A problem in the Problems window that says &quot;The project path must be an existing folder path relavtive to the azure.yaml file&quot;\" \/><\/p>\n<h3><code>azure.yaml<\/code> rename refactoring for folder updates<\/h3>\n<p>Next, we have added a rename refactoring for <code>azure.yaml<\/code>. If you rename or move folders in your project, you&#8217;ll be prompted to automatically refactor your <code>azure.yaml<\/code> file&#8217;s <code>project<\/code> property values.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-content\/uploads\/sites\/58\/2023\/07\/2023-07-11-azd-vscode-rename.gif\" alt=\"A GIF of rename refactoring suggestions in azure.yaml\" \/><\/p>\n<h3>Drag-and-drop add services into your <code>azure.yaml<\/code><\/h3>\n<p>Finally, we&#8217;ve added an editing feature that allows you to drag a folder into your <code>azure.yaml<\/code> while holding <strong>Shift<\/strong> to automatically add a service to the file with proper tab stops at <code>project<\/code>, <code>language<\/code>, and <code>host<\/code> and enums to help select the right values in those places. Helping you write less YAML, one feature at a time!<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-content\/uploads\/sites\/58\/2023\/07\/2023-07-11-azd-drag-and-drop.gif\" alt=\"A GIF of the drag-and-drop add services feature\" \/><\/p>\n<h2>Other changes and enhancements<\/h2>\n<p>We have also added smaller enhancements and fixed issues requested by users that should improve your experience working with the Azure Developer CLI. Some notable changes include:<\/p>\n<ul>\n<li>Smaller features\n<ul>\n<li>Support for build-args to Docker builds (<a href=\"https:\/\/github.com\/Azure\/azure-dev\/issues\/1270\">azure-dev#1270<\/a>)<\/li>\n<li>Investigate using the GH CLI auth UX in Codespaces (<a href=\"https:\/\/github.com\/Azure\/azure-dev\/issues\/2332\">azure-dev#2332<\/a>)<\/li>\n<li>Improved <code>azd package<\/code>\/<code>azd deploy<\/code> output for Dockerized projects (<a href=\"https:\/\/github.com\/Azure\/azure-dev\/issues\/898\">azure-dev#898<\/a>)<\/li>\n<\/ul>\n<\/li>\n<li>Bug fixes for <code>azd<\/code> core\n<ul>\n<li><code>azd pipeline config<\/code> with federated credentials now supports different branches (<a href=\"https:\/\/github.com\/Azure\/azure-dev\/pull\/2040\">azure-dev#2040<\/a>, <a href=\"https:\/\/github.com\/Azure\/azure-dev\/issues\/2428\">azure-dev#2428<\/a>)<\/li>\n<li>Validate environment exists when running <code>azd env select<\/code>(<a href=\"https:\/\/github.com\/Azure\/azure-dev\/issues\/2306\">azure-dev#2306<\/a>)<\/li>\n<li><code>azd env refresh<\/code> alters numeric string value in <code>.env<\/code> file (<a href=\"https:\/\/github.com\/Azure\/azure-dev\/issues\/2307\">azure-dev#2307<\/a>)<\/li>\n<li><code>azd auth login<\/code> fails due to <code>reauthentication required, run azd auth login<\/code> to log in (<a href=\"https:\/\/github.com\/Azure\/azure-dev\/issues\/2299\">azure-dev#2299<\/a>)<\/li>\n<li><code>azd pipeline config<\/code> results in role assignment error (<a href=\"https:\/\/github.com\/Azure\/azure-dev\/issues\/2287\">azure-dev#2287<\/a>)<\/li>\n<li><code>azd down<\/code> doesn&#8217;t purge cognitive service (<a href=\"https:\/\/github.com\/Azure\/azure-dev\/issues\/1941\">azure-dev#1941<\/a><\/li>\n<li><code>azd auth login<\/code> fails after updating to MSAL 1.0 when doing log in for the first time (<a href=\"https:\/\/github.com\/Azure\/azure-dev\/issues\/2258\">azure-dev#2258<\/a>)<\/li>\n<li>Action URL is invalid after running <code>pipeline config<\/code>(<a href=\"https:\/\/github.com\/Azure\/azure-dev\/issues\/2236\">azure-dev#2236<\/a>)<\/li>\n<li>Running Bicep fails in a blank Ubuntu container (<a href=\"https:\/\/github.com\/Azure\/azure-dev\/issues\/2197\">azure-dev#2197<\/a>)<\/li>\n<li><code>azure.yaml<\/code> schema says default shell is &#8220;sh&#8221; but error says otherwise (<a href=\"https:\/\/github.com\/Azure\/azure-dev\/issues\/2346\">azure-dev#2346<\/a>)<\/li>\n<li>Errors interrupt spinner, producing screen output harder to interpret (<a href=\"https:\/\/github.com\/Azure\/azure-dev\/issues\/2353\">azure-dev#2353<\/a>)<\/li>\n<li>Forward slashes replaced by backslash for within inline hook scripts (<a href=\"https:\/\/github.com\/Azure\/azure-dev\/issues\/2365\">azure-dev#2365<\/a>)<\/li>\n<li>Subscription and location aren&#8217;t being saved after provisioning attempt (<a href=\"https:\/\/github.com\/Azure\/azure-dev\/issues\/2325\">azure-dev#2325<\/a>)<\/li>\n<li>Remove infrastructure outputs from <code>.env<\/code> on <code>azd down<\/code>(<a href=\"https:\/\/github.com\/Azure\/azure-dev\/issues\/2217\">azure-dev#2217<\/a>)<\/li>\n<li>Login doesn&#8217;t produce nonzero exit code on failure (<a href=\"https:\/\/github.com\/Azure\/azure-dev\/issues\/2221\">azure-dev#2221<\/a>)<\/li>\n<\/ul>\n<\/li>\n<li>Bug fixes for Visual Studio Code\n<ul>\n<li>VS Code issue when running show with no init&#8217;d project (<a href=\"https:\/\/github.com\/Azure\/azure-dev\/issues\/2296\">azure-dev#2296<\/a>)<\/li>\n<\/ul>\n<\/li>\n<li>Bug fixes for Azure host support (for example, Azure Container Apps and Azure Kubernetes Service)\n<ul>\n<li>Unable to deploy to a container app that uses workload profiles (<a href=\"https:\/\/github.com\/Azure\/azure-dev\/issues\/2402\">azure-dev#2402<\/a>)<\/li>\n<li><code>azd<\/code> deployment fails on a valid ingress that has endpoints assigned (<a href=\"https:\/\/github.com\/Azure\/azure-dev\/issues\/2390\">azure-dev#2390<\/a>)<\/li>\n<li>Managed HSMs aren&#8217;t purged (<a href=\"https:\/\/github.com\/Azure\/azure-dev\/issues\/2348\">azure-dev#2348<\/a>)<\/li>\n<li>Container App deploy fails without registry admin user enabled (<a href=\"https:\/\/github.com\/Azure\/azure-dev\/issues\/2244\">azure-dev#2244<\/a>)<\/li>\n<li>Service deployment to AKS failure on verification step due to Redis targetPort tag being assigned as string (<a href=\"https:\/\/github.com\/Azure\/azure-dev\/issues\/2270\">azure-dev#2270<\/a>)<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2>Community contributions<\/h2>\n<p>We\u2019d also like to extend a special thanks to the community contributors of this release:<\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/liamchampton\">liamchampton<\/a> &#8211; fix quickstart commands on the README in the todo projects (<a href=\"https:\/\/github.com\/Azure\/azure-dev\/pull\/2436\">azure-dev#2436<\/a>)<\/li>\n<li><a href=\"https:\/\/github.com\/JayDoubleu\">JayDoubleu<\/a> &#8211; Update bicep.go (bump bicep to 0.17.1) (<a href=\"https:\/\/github.com\/Azure\/azure-dev\/pull\/2310\">azure-dev#2310<\/a><\/li>\n<\/ul>\n<p>You can use the Azure Developer CLI from:<\/p>\n<ul>\n<li>Your terminal of choice on Windows, Linux, or macOS.<\/li>\n<li>Visual Studio Code or GitHub Codespaces by <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-azuretools.azure-dev\">downloading the extension<\/a> from the Marketplace, or installing it directly from the extension view (<code>Ctrl<\/code> + <code>Shift<\/code> + <code>X<\/code>, or <code>Cmd<\/code> + <code>Shift<\/code> + <code>X<\/code> for macOS) in Visual Studio Code.<\/li>\n<li>Visual Studio by <a href=\"https:\/\/devblogs.microsoft.com\/azure-sdk\/introducing-the-azure-developer-cli-a-faster-way-to-build-apps-for-the-cloud\/#visual-studio\">enabling the preview feature flag<\/a>.\nYou can learn more about the Azure Developer CLI from our <a href=\"https:\/\/aka.ms\/azd\">official documentation<\/a>. If you run into any problems or have suggestions, file an issue or start a discussion in the <a href=\"https:\/\/github.com\/Azure\/azure-dev\">Azure Developer CLI repository<\/a>.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>This post announces the July 2023 release of the Azure Developer CLI (`azd`). This release includes resource group-scoped deployments, azd as a GitHub Action, azd as a DevContainer feature, updates to our VS Code extension, and more!<\/p>\n","protected":false},"author":95415,"featured_media":2111,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[701,864,878,160,159,861,162,733,895],"class_list":["post-2752","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-azure-sdk","tag-net","tag-azure-developer-cli","tag-codespaces","tag-java","tag-javascript","tag-kubernetes","tag-python","tag-typescript","tag-vscode"],"acf":[],"blog_post_summary":"<p>This post announces the July 2023 release of the Azure Developer CLI (`azd`). This release includes resource group-scoped deployments, azd as a GitHub Action, azd as a DevContainer feature, updates to our VS Code extension, and more!<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/posts\/2752","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/users\/95415"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/comments?post=2752"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/posts\/2752\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/media\/2111"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/media?parent=2752"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/categories?post=2752"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/tags?post=2752"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}