Azure Developer CLI (azd) – February 2023 Release
We’re pleased to announce that the February 2023 release (
0.6.0-beta.1) of the Azure Developer CLI (
azd) is now available. You can learn about how to get started with the Azure Developer CLI by visiting our Dev Hub.
This release includes the following features and improvements:
- Support for command and service hooks (azure-dev#1429)
- Support for installation via Homebrew, Windows Package Manager, and Chocolatey (azure-dev#1383, azure-dev#1382, azure-dev#744)
- Support for multiple Azure organizations (azure-dev#1478)
Support for command and service hooks
We’re excited to announce that as of this release you’re now able to even further customize your workflow via new command and service hooks. In chatting with our users, we’d heard feedback that sometimes you want to execute some task or script pre- or post-
azd command or service event. With this feedback in mind, we’ve added the ability for you to execute scripts or commands from within your project’s
azd command hooks are now available:
postrestore: Run before and after package dependencies are restored.
postprovision: Run before and after Azure resources are created.
postdeploy: Run before and after the application code is deployed to Azure.
postup: Run before and after the combined deployment pipeline.
Upis a shorthand command that runs
postdown: Run before and after the resources are removed.
The following service lifecycle event hooks are available:
postrestore: Run before and after the service packages and dependencies are restored.
postpackage: Run before and after the app is packaged for deployment.
postdeploy: Run before and after the service code is deployed to Azure.
Here’s an example of how to configure both an inline script on pre-
restore and an external script on pre-
provision using this new feature:
name: todo-nodejs-mongo metadata: template: firstname.lastname@example.org hooks: prerestore: # Example of an inline script. (shell is required for inline scripts) shell: sh run: echo 'Hello' preprovision: # Example of external script (Relative path from project root) run: ./hooks/preprovision.sh services: web: project: ./src/web dist: build language: js host: appservice api: project: ./src/api language: js host: appservice
To learn more about our new hooks support and see examples, check out this article on our DevHub.
Support for installation via Homebrew, Windows Package Manager and Chocolatey
We’ve been teasing support for installing
azd via your favorite package managers for a couple releases now so we’re excited to announce we’re shipping support for Homebrew (
brew), Windows Package Manager (
winget), and Chocolatey (
choco) in the latest release of the CLI.
You can now install
brew tap azure/azd && brew install azd
winget install microsoft.azd
choco install azd
If your favorite package manager isn’t yet supported, you can continue to follow the instructions at aka.ms/azd-install. We’re also working on supporting installation via
yum so stay tuned for that support in an upcoming release.
Support for multiple Azure organizations
Subscriptions from all organizations of the user are now listed when
azd init prompts for subscriptions.
azd commands also support running against environments from different organizations seamlessly. Previous workarounds that required
auth.useAzCliAuth set to
true should no longer be required. If you use subscriptions from multiple Azure organizations and have feedback on this new experience, let us know!
Since our last release, we also have some awesome new templates to highlight! As a reminder, these templates were designed to be flexible. You can take these templates, modify or swap out the source code, and get up and running on Azure in just a couple of minutes. Each of these templates includes Infrastructure as Code files that specify and configure all the Azure resources needed for your application to run in the cloud.
These samples cover common patterns like:
- Working with external systems as inputs and outputs, and
- Communicating reliably and securely via auto-mTLS and built-in retries
- Deploy a Python (Flask) web app with PostgreSQL in Azure
- Deploy a Python (Django) web app with PostgreSQL in Azure
- HTTP API powered by FastAPI with Azure Functions and APIM
Other changes and enhancements
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:
azd up --templateso it can initialize a new project (azure-dev#1394)
- MSI Upgrades from pre-MSI versions fail in some cases (azure-dev#1406)
- Improve UX styling for
azd pipeline config[azure-dev#1407]
initnow restores file executable permissions and initializes a
gitrepository automatically. (azure-dev#1495)
- Improve performance of
azd --helpon Windows for domain-joined users (azure-dev#1470)
- Fix display for Function App types in
We’d also like to extend a special thanks to the community contributors of this release:
- flcdrg – for their work on creating our Chocolatey package
- aaronpowell – Incorrect message on
azd login --help(azure-dev#1360)
- Add err to message for help with debugging login issue (azure-dev#1365)
- Core bicep module
apim-api.bicepnow links Web App or Function App instances to allow users on the Azure portal to navigate to the API management resource directly from the Web App or Function App.(azure-dev#1403)
- Core bicep module
ftpsStateas a parameter to configure FTPS upload behavior (azure-dev#1345)
provisionprogress for PostgreSQL server resources(azure-dev#1418)
- For Python projects, skip packaging of virtual environment (
- lechnerc77 – Core bicep module
healthCheckPathas a parameter to configure the health-check endpoint (azure-dev#1497)
Try out these new improvements by installing the Azure Developer CLI!
You can use the Azure Developer CLI from:
- Your terminal of choice on Windows, Linux, or macOS.
- Visual Studio Code or GitHub Codespaces by downloading the extension from the Marketplace, or installing it directly from the extension view (
Xfor macOS) in Visual Studio Code.
- Visual Studio by enabling the preview feature flag. You can learn more about the Azure Developer CLI from our Dev Hub documentation. If you run into any problems or have suggestions, file an issue or start a discussion on Azure Developer CLI repo.