{"id":2583,"date":"2023-04-11T12:53:50","date_gmt":"2023-04-11T19:53:50","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/azure-sdk\/?p=2583"},"modified":"2023-04-11T12:53:50","modified_gmt":"2023-04-11T19:53:50","slug":"azd-april-2023-release","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/azure-sdk\/azd-april-2023-release\/","title":{"rendered":"Azure Developer CLI (azd) &#8211; April 2023 Release"},"content":{"rendered":"<p>We&#8217;re pleased to announce that the April 2023 release (<code>0.8.0-beta.1<\/code>) of the Azure Developer CLI (<code>azd<\/code>) is now available. You can learn about how to get started with the Azure Developer CLI by visiting our <a href=\"https:\/\/aka.ms\/azd\">Dev Hub<\/a>.<\/p>\n<p>This release includes the following features and improvements:<\/p>\n<ul>\n<li>Changes to <code>azd up<\/code>\n<ul>\n<li>Removing <code>azd init<\/code> from <code>azd up<\/code><\/li>\n<li>A deeper dive into <code>azd deploy<\/code> and a new <code>azd package<\/code> command<\/li>\n<\/ul>\n<\/li>\n<li>Alpha, beta and stable features (<a href=\"https:\/\/github.com\/Azure\/azure-dev\/issues\/1633\">azure-dev#1633<\/a>)\n<ul>\n<li>Terraform support in alpha<\/li>\n<\/ul>\n<\/li>\n<li>Other command updates\n<ul>\n<li>Hidden commands and flags<\/li>\n<li>Changes to working directory sensitivity in <code>azd deploy<\/code> and <code>azd restore<\/code><\/li>\n<li>Changes to your initialization workflow + environments<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>There isn&#8217;t a community call this month but we have many upcoming events where you can learn about the latest in the Azure Developer CLI:<\/p>\n<ul>\n<li><a href=\"https:\/\/www.citusdata.com\/cituscon\/2023\/schedule\/\">Citus Con<\/a> &#8211; April 18 at 10:30am Pacific Time (virtual; speaker: <a href=\"https:\/\/github.com\/pamelafox\">Pamela Fox<\/a>)<\/li>\n<li><a href=\"https:\/\/us.pycon.org\/2023\/schedule\/presentation\/154\/\">PyCon US<\/a> &#8211; April 20 at 1:30pm Mountain Time (in-person; speaker: <a href=\"https:\/\/github.com\/savannahostrowski\">Savannah Ostrowski<\/a>)<\/li>\n<li><a href=\"https:\/\/developer.microsoft.com\/en-us\/reactor\/events\/18966\/\">PyDay<\/a> &#8211; May 2 at 9:30am Pacific Time (virtual; speaker: speaker: <a href=\"https:\/\/github.com\/pamelafox\">Pamela Fox<\/a>)<\/li>\n<\/ul>\n<p>See you all next month! Now, let&#8217;s get into what&#8217;s new in <code>0.8.0-beta.1<\/code>!<\/p>\n<h2>Changes to <code>azd up<\/code><\/h2>\n<p>Since our public preview, we&#8217;ve received a lot of feedback around the behavior of <code>azd up<\/code> being a bit unexpected. Prior to this release, <code>azd up<\/code> combined both project initialization (a one-time operation) with provisioning infrastructure\/deployment (an operation you&#8217;re likely to do many times as your build out your app). If you were invoking <code>azd up<\/code> to get your app up and running on Azure, you would have only benefitted from the <code>azd init<\/code> step if you ran <code>azd up --template &lt;some_template&gt;<\/code>. After the initial run of <code>azd up<\/code> on your codebase, the <code>azd init<\/code> step would have no-op&#8217;d as the application was already initialized with <code>azd<\/code>. So, <code>azd up<\/code> was just a <code>provision<\/code> and <code>deploy<\/code> in practice.<\/p>\n<h3>Removing <code>azd init<\/code> from <code>azd up<\/code><\/h3>\n<p>With this release, we&#8217;ve addressed this feedback and have removed <code>azd init<\/code> as a step\/sub-command of <code>azd up<\/code>. With this change, the new flow for getting started is to run:<\/p>\n<pre><code>&gt; azd init --template &lt;some_template&gt;\r\n&gt; azd up<\/code><\/pre>\n<h3>A deeper dive into <code>azd deploy<\/code> and a new <code>azd package<\/code> command<\/h3>\n<p>Let&#8217;s talk more about that last step &#8211; <code>azd deploy<\/code>. This command is really a build lifecycle command\/step, which deploys your code on Azure infrastructure. Under the hood, <code>azd<\/code> packages up your build based on your chosen language&#8217;s toolchain and injects all the relevant bits for a successful Azure deployment.<\/p>\n<p>Over the past several months, we&#8217;ve received feedback that folks wanted more visibility into this build process. We&#8217;ve also heard that there are also some cases where developers want to generate their Infrastructure as Code from another language, rather than writing Bicep or Terraform directly. With both of these feedback themes in mind, we&#8217;ve decided to expose a new command &#8211; <code>azd package<\/code>. This new command aims to help you in debugging by providing you with the ability to see <strong>exactly<\/strong> what&#8217;s being deployed on Azure. As always, we wanted to ensure that <code>azd<\/code> affords the right level of visibility and flexibility and the introduction of this new command is another step in that direction.<\/p>\n<p>With the <code>0.8.0-beta.1<\/code> release, this new <code>azd package<\/code> command is now the first step in <code>azd up<\/code>, followed by <code>azd provision<\/code> and <code>azd deploy<\/code>.<\/p>\n<p>We hope that these changes enable you to build applications with whatever workflow makes you most productive. As always, let us know if you have any feedback or questions on the <a href=\"https:\/\/github.com\/Azure\/azure-dev\">Azure Developer CLI repo<\/a>.<\/p>\n<h2>Alpha, beta and stable features<\/h2>\n<p>As we continue to build out the CLI&#8217;s capabilities, we want to ensure that our users are clear on the level of fidelity of each feature we add. As you and your teams adopt <code>azd<\/code>, we want to make sure that you&#8217;re set up for success and know which features you can rely on for production and business-critical scenarios.<\/p>\n<p>As such, we&#8217;re introducing new alpha, beta, and stable feature stages for the CLI. You can read more about what each of these stages mean and the process for feature graduation on our <a href=\"http:\/\/aka.ms\/azd\">DevHub.<\/a> The full list of features and their corresponding stage can be found on <a href=\"https:\/\/aka.ms\/azd-feature-stages\">our repo<\/a>.<\/p>\n<p>Practically speaking, you might be wondering what these feature stages mean for you. If you&#8217;re using a beta or stable feature, you can continue using them as you are today. It should be noted that you should use beta features with caution in business-critical use cases as there&#8217;s a small chance of incompatible changes in subsequent releases leading up to stable. Beta commands are denoted as such with <code>(Beta)<\/code> in <code>azd -h<\/code>.<\/p>\n<p>If you&#8217;d like to use an alpha stage feature, you now need to manually enable it. Here are some of the relevant commands for setting alpha stage features:<\/p>\n<ul>\n<li><code>azd config list-alpha<\/code> &#8211; List all alpha stage features<\/li>\n<li><code>azd config set alpha.&lt;feature_name&gt; on<\/code> &#8211; Enable a specific feature (names can be grabbed from <code>azd config list-alpha<\/code>)<\/li>\n<li><code>azd config unset alpha.&lt;feature_name&gt; on<\/code> &#8211; Disable a specific feature (names can be grabbed from <code>azd config list-alpha<\/code>)<\/li>\n<li><code>azd config set alpha.all on<\/code> &#8211; Enable all alpha features<\/li>\n<li><code>azd config unset alpha.all<\/code> &#8211; Disable all alpha features<\/li>\n<li><code>azd config list<\/code> &#8211; View your full <code>azd<\/code> config<\/li>\n<\/ul>\n<h3>Terraform support in alpha stage<\/h3>\n<p>With this new system, the largest change we&#8217;ve introduced this release is that our Terraform support is now behind a feature flag as it&#8217;s in alpha stage. We&#8217;ve designated Terraform as alpha because we haven&#8217;t yet gotten a ton feedback about the current support and its level of fidelity. If you want to use Terraform, you can enable support via:<\/p>\n<pre><code>azd config set alpha.terraform on<\/code><\/pre>\n<p>We&#8217;ll graduate Terraform support to beta stage when we feel like we&#8217;ve seen enough usage of it and have received a solid amount of feedback.<\/p>\n<h2>Other command updates<\/h2>\n<p>In this release, we have also made many updates to core <code>azd<\/code> commands. Most of the command updates are cosmetic as we wanted to give you all a heads up to the changes we plan to make. If you have any feedback or questions, let us know on the <a href=\"https:\/\/github.com\/Azure\/azure-dev\">Azure Developer CLI repository<\/a>.<\/p>\n<h3>Hidden commands and flags as of <code>0.8.0-beta.1<\/code><\/h3>\n<p>The following commands and flags are hidden from <code>azd -h<\/code> as of this release. If you&#8217;re using the following commands\/flags, consider the listed alternatives. If these changes are blocking or break your workflow, let us know by filing an issue on <a href=\"https:\/\/github.com\/Azure\/azure-dev\">GitHub<\/a>.<\/p>\n<ul>\n<li><code>azd infra create<\/code> and <code>azd infra delete<\/code> is hidden from <code>azd -h<\/code> with the intent for removal in a future release. Use <code>azd provision<\/code> and <code>azd down<\/code>, respectively, as these commands are aliases. As a result of this removal, <code>infracreate<\/code> and <code>infradelete<\/code> hooks aren&#8217;t available in <code>azure.yaml<\/code>.<\/li>\n<li><code>--output<\/code> flag is hidden for all commands for the time being as our team is looking to solidify our output contracts as we continue to build out <code>azd<\/code>. No warning messages are emitted if the <code>--output<\/code> flag is used.<\/li>\n<li><code>azd login<\/code> and <code>azd logout<\/code> is hidden from <code>azd -h<\/code> with the intent for removal in a future release. We have introduced <code>azd auth login<\/code> and <code>azd auth logout<\/code>. We&#8217;re adding the subcategory <code>auth<\/code> to allow for a logical grouping for &#8220;auth&#8221; or &#8220;user&#8221;-related commands.<\/li>\n<li><code>--service<\/code> flag will be hidden in <code>azd deploy<\/code> and <code>azd restore<\/code> with the intent for removal in a future release. We&#8217;d encourage you to use <code>azd deploy &lt;service&gt;<\/code> and <code>azd restore &lt;service&gt;<\/code> instead.<\/li>\n<li>The following flags are removed from <code>azd up<\/code> as a result of the removal of <code>azd init<\/code> from that workflow:\n<ul>\n<li><code>--template<\/code> \/ <code>-t<\/code><\/li>\n<li><code>--location<\/code> \/ <code>-l<\/code><\/li>\n<li><code>--branch<\/code> \/ <code>-b<\/code><\/li>\n<li><code>--subscription<\/code><\/li>\n<\/ul>\n<\/li>\n<li>The following flags will be hidden from help text with the intent for removal in a future release:\n<ul>\n<li><code>--service<\/code><\/li>\n<li><code>--no-progress<\/code><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3>Changes to working directory sensitivity in <code>azd deploy<\/code> and <code>azd restore<\/code><\/h3>\n<p>As we plan to remove the <code>--service<\/code> flag from all commands, there are some changes that we&#8217;ve made to the current working directory sensitivity of <code>azd deploy<\/code> and <code>azd restore<\/code>:<\/p>\n<ul>\n<li><code>azd deploy<\/code> and <code>azd restore<\/code> deploys the current service, when the current working directory is set to a service directory (as defined in <code>azure.yaml<\/code>).<\/li>\n<li><code>azd deploy<\/code> and <code>azd restore<\/code> deploys all services, when the current working directory is set to the root project directory (that is, the directory that contains <code>azure.yaml<\/code>).<\/li>\n<li>In outside of service and root directories, <code>azd deploy<\/code> and <code>azd restore<\/code> doesn&#8217;t attempt a deployment and instead offer suggestions.<\/li>\n<li><code>azd deploy --all<\/code> can be used to deploy all services, or <code>azd deploy &lt;service&gt;<\/code> to deploy a given service.<\/li>\n<\/ul>\n<p>When <code>--all<\/code> or a specific service name is passed in as the third argument, <code>azd deploy<\/code> can be run from any directory within your project.<\/p>\n<h3>Changes to the initialization workflow + <code>azd<\/code> environments<\/h3>\n<p>To streamline the getting started experience of the CLI, we&#8217;ve also been refining <code>azd<\/code> environments and when they get introduced in your workflow. Prior to the <code>0.8.0-beta.1<\/code> release, the flow looked like:<\/p>\n<ul>\n<li>Run <code>azd login<\/code><\/li>\n<li>Run <code>azd init<\/code> (as a standalone command or via <code>azd up<\/code>)<\/li>\n<li>Type an environment name, select a region, select a subscription<\/li>\n<li>Run <code>azd provision<\/code> (as a standalone command or via <code>azd up<\/code>)<\/li>\n<\/ul>\n<p>As of the <code>0.8.0-beta.1<\/code> release, you aren&#8217;t required to run <code>azd login<\/code> before running <code>azd init<\/code>. You&#8217;re now only asked for an environment name on <code>init<\/code> and required to select a region and subscription when you run <code>azd provision<\/code> (either as a standalone command or as part of <code>azd up<\/code>). The flow now looks like:<\/p>\n<ul>\n<li>Run <code>azd init --template &lt;some_template&gt;<\/code> (as a standalone command; remember <code>azd init<\/code> is no longer part of <code>azd up<\/code>)<\/li>\n<li>Enter an environment name<\/li>\n<li>Run <code>azd auth login<\/code> (if not already authenticated; credentials are persisted across projects)<\/li>\n<li>Run <code>azd provision<\/code> (as a standalone command or via <code>azd up<\/code>)<\/li>\n<li>Select a region, select a subscription<\/li>\n<\/ul>\n<p>We believe that this new flow is more understandable as you aren&#8217;t required to authenticate on Azure before you provision infrastructure. One other implication that this change has is that commands like <code>azd deploy<\/code> and <code>azd pipeline config<\/code> now require you to have run <code>azd provision<\/code> (as a standalone command or via <code>azd up<\/code>) beforehand.<\/p>\n<h2>New Azure Developer CLI templates<\/h2>\n<p>Over the last month, we&#8217;ve had some great new templates added to the <a href=\"aka.ms\/awesome-azd\">awesome-azd<\/a> gallery! A big thank you to the contributors! If you&#8217;re interested in learning how to build your own template, check out <a href=\"https:\/\/aka.ms\/azure-dev\/azdifyblog1b\">the latest blog post<\/a> in our &#8220;azd-ify&#8221; series!<\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/Azure-Samples\">Azure Content Team<\/a>\n<ul>\n<li><a href=\"https:\/\/github.com\/Azure-Samples\/azure-search-openai-demo\">ChatGPT + Enterprise data with Azure OpenAI and Cognitive Search<\/a> &#8211; A sample app for the Retrieval-Augmented Generation pattern running in Azure, using Azure Cognitive Search for retrieval and Azure OpenAI large language models to power ChatGPT-style and Q&amp;A experiences.<\/li>\n<li><a href=\"https:\/\/github.com\/Azure-Samples?q=dapr+azd-templates&amp;type=all&amp;language=&amp;sort=\">New Dapr samples<\/a> &#8211; PubSub, Bindings, Service Invocation samples in Python, JavaScript and C#.<\/li>\n<\/ul>\n<\/li>\n<li><a href=\"https:\/\/github.com\/pamelafox\">pamelafox<\/a>\n<ul>\n<li><a href=\"https:\/\/github.com\/pamelafox\/staticmaps-function\">Static Maps API (Function App)<\/a> &#8211; A FastAPI that can generate maps using the py-staticmaps package. Designed for deployment to Azure Functions + Azure CDN, using the Azure Developer CLI and Bicep files.<\/li>\n<li><a href=\"https:\/\/github.com\/pamelafox\/flask-gallery-container-app\">Flask Gallery Container App with CDN<\/a> &#8211; An example Flask app for a photo gallery designed to be run inside Docker and deployed to Azure Container Apps with the Azure Developer CLI.<\/li>\n<li><a href=\"https:\/\/github.com\/Azure-Samples\/fastapi-on-azure-functions\">FastAPI on Azure Functions<\/a> &#8211; A sample to run a FastAPI app on Azure Functions<\/li>\n<li><a href=\"https:\/\/github.com\/pamelafox\/flask-charts-api-container-app\">Flask Chart API on ACA + CDN<\/a> &#8211; An example Flask app for a chart generator API designed to be run inside Docker and deployed to Azure Container Apps with the Azure Developer CLI.<\/li>\n<li><a href=\"https:\/\/github.com\/pamelafox\/flask-surveys-container-app\">Flask Surveys Container App<\/a> &#8211; An example Flask app for public surveys (no user auth) designed to be run inside Docker and deployed to Azure Container Apps with the Azure Developer CLI.<\/li>\n<li><a href=\"https:\/\/github.com\/pamelafox\/simple-flask-api-container\">Flask API on Azure Container Apps<\/a> &#8211; A simple Flask API app that is containerized and designed for development on Azure Container Apps.<\/li>\n<\/ul>\n<\/li>\n<li><a href=\"https:\/\/github.com\/savannahostrowski\">savannahostrowski (that&#8217;s me!)<\/a>\n<ul>\n<li><a href=\"https:\/\/github.com\/savannahostrowski\/jupyter-mercury-aca\">Jupyter Notebooks Rendered with Mercury on Azure Container Apps<\/a> &#8211; A web application used for hosting, sharing and interacting with Jupyter Notebooks via Mercury, hosted on Azure Container Apps.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2>Other changes and enhancements<\/h2>\n<p>We have also added small 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><code>azd init<\/code> fails after declining to overwrite files from template repo (<a href=\"https:\/\/github.com\/Azure\/azure-dev\/issues\/1656\">azure-dev#1656<\/a>)<\/li>\n<li>Error message shouldn&#8217;t state &#8216;bicep&#8217; instead use iac-agnostic term (<a href=\"https:\/\/github.com\/Azure\/azure-dev\/issues\/1521\">azure-dev#1521<\/a>)<\/li>\n<li>Service hook: unable to determine script type (<a href=\"https:\/\/github.com\/Azure\/azure-dev\/issues\/1579\">azure-dev#1579<\/a>)<\/li>\n<li>Publish templates to azure samples browser (<a href=\"https:\/\/github.com\/Azure\/azure-dev\/issues\/526\">azure-dev#526<\/a>]<\/li>\n<li>Make install scripts install Rosetta 2 if not present on ARM64 (<a href=\"https:\/\/github.com\/Azure\/azure-dev\/issues\/1548\">azure-dev#1548<\/a>)<\/li>\n<li>Login flow in Devcontainer fails (improve login debugging) (<a href=\"https:\/\/github.com\/Azure\/azure-dev\/issues\/1609\">azure-dev#1609<\/a>)<\/li>\n<li>[AzureDeveloperCliCredential &#8211; azd] Wrong token is returned when multi-tenant. (<a href=\"https:\/\/github.com\/Azure\/azure-dev\/issues\/1712\">azure-dev#1712<\/a>)<\/li>\n<li>Setting Principal ID on multi-tenant scenario (<a href=\"https:\/\/github.com\/Azure\/azure-dev\/issues\/1729\">azure-dev#1729<\/a>)<\/li>\n<li>VS Code: first install errors (<a href=\"https:\/\/github.com\/Azure\/azure-dev\/issues\/1728\">azure-dev#1728<\/a>)<\/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\/lechnerc77\">lechnerc77<\/a> &#8211; Using Terraform sample setup with Node.js version 18.LTS (<a href=\"https:\/\/github.com\/Azure\/azure-dev\/issues\/1716\">azure-dev#1716<\/a>)<\/li>\n<\/ul>\n<p>Try out these new improvements by <a href=\"https:\/\/aka.ms\/azure-dev\/install-instructions\">installing the Azure Developer CLI<\/a>!<\/p>\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\">Dev Hub documentation<\/a>. If you run into any problems or have suggestions, file an issue or start a discussion on <a href=\"https:\/\/github.com\/Azure\/azure-dev\">Azure Developer CLI repo<\/a>.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>This post announces the April 2023 release of the Azure Developer CLI (`azd`). Updates to environments and azd up, a new package command, and new feature toggle for alpha stage features.<\/p>\n","protected":false},"author":95415,"featured_media":2276,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[864,815,878,160,159,861,162,733,895],"class_list":["post-2583","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-azure-sdk","tag-azure-developer-cli","tag-c","tag-codespaces","tag-java","tag-javascript","tag-kubernetes","tag-python","tag-typescript","tag-vscode"],"acf":[],"blog_post_summary":"<p>This post announces the April 2023 release of the Azure Developer CLI (`azd`). Updates to environments and azd up, a new package command, and new feature toggle for alpha stage features.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/posts\/2583","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=2583"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/posts\/2583\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/media\/2276"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/media?parent=2583"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/categories?post=2583"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/tags?post=2583"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}