July 12th, 2023

Azure Developer CLI (azd) – July 2023 Release

Savannah Ostrowski
Senior Product Manager

We’re pleased to announce that the July 2023 release (1.1.0) of the Azure Developer CLI (azd) is now available. As always, you can learn about how to get started with the Azure Developer CLI by visiting our official documentation.

In case you missed it, the Azure Developer CLI reached stable at Microsoft Build in May!

Here’s what’s new in azd since our May release:

Resource group-scoped deployments

As of the 1.1.0 release, we’ve expanded our deployment scopes to include resource groups for Bicep. Prior to this release, azd only supported subscription scope deployments.

In order to use resource group scoped deployments, you need to enable this feature in the CLI using the following command as all features now start in alpha stage.

azd config set alpha.resourceGroupDeployments on

When running azd provision or azd up on a repository with resource group scope infrastructure as code, you’ll now be prompted to create a new resource group or select an existing resource group by name to provision to.

A GIF of the new provision workflow where you can select or create a resource group

Reference documentation more quickly with --docs

To make jumping to azd documentation simpler, we’ve added a new --docs flag on all commands! Now, when you run something like azd deploy --docs, a browser tab opens and jumps straight to the reference documentation for deploy. From there, you can explore any other Azure Developer CLI documentation you might need — no URL required!

azd as a GitHub Action

Previously, to use the Azure Developer CLI in a GitHub Action, you were required to “manually” install azd via curl or use a bulky all-in-one image 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’m using a Python and React template, I may not need or want Java installed, or vice versa.

As of this release, we’ve published azd as a GitHub Action. Similar to other familiar setup-* GitHub Actions, you can now find setup-azd in the GitHub Actions Marketplace. As part of your dependency setup in CI/CD, you can now add the following to install azd.


on: [push]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Install azd
        uses: Azure/setup-azd@v0.1.0

azd as a Dev Container feature

As of this release, we have also shipped azd as a Dev Container feature! If you’re unfamiliar, Development Containers (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.

With our new azd Dev Container feature, you can include the following to your .devcontainer.json to install the Azure Developer CLI:

"features": {
  "ghcr.io/azure/azure-dev/azd:latest": {}
}

Alternatively, you can install the Remote Containers extension and add Dev Container configurations to your project using the following steps:

  1. “Control + Shift + P” (Windows) or “Command + Shift + P” (Mac) to open the Command Palette
  2. Type “Dev Containers: Add Dev Containers configuration files…”
  3. Select a predefined container definition
  4. Select a version
  5. Select features to install (for example “Azure Developer CLI”)

At the end, you have a .devcontainer directory in your workspace with a devcontainer.json you can further modify.

A special thank you to aaronpowell for their contributions to this feature and for updating our templates to use this new feature!

ARM native builds of azd

We have made an important update to the install-azd.sh so now when you run the script with the -a arm64 flag, it installs the Arm64 version of azd specifically.

For example, this new support allows someone to install the ARM build of azd creating a Dev Container or Codespace:

curl -fsSL https://aka.ms/install-azd.sh | bash -s -- -a $(dpkg --print-architecture)

If you don’t specify the -a flag, the script defaults to installing the amd64 version on macOS, and it fails on Linux, just like before.

Visual Studio Code updates

In this release, we’ve added many features to help make editing your azure.yaml file simpler.

azure.yaml diagnostics for invalid paths

First, we have added diagnostics (for example, errors) to report when a folder referenced as a service in your azure.yaml doesn’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 azd.

An error-level diagnostic under an incorrect path in azure.yaml A problem in the Problems window that says "The project path must be an existing folder path relavtive to the azure.yaml file"

azure.yaml rename refactoring for folder updates

Next, we have added a rename refactoring for azure.yaml. If you rename or move folders in your project, you’ll be prompted to automatically refactor your azure.yaml file’s project property values.

A GIF of rename refactoring suggestions in azure.yaml

Drag-and-drop add services into your azure.yaml

Finally, we’ve added an editing feature that allows you to drag a folder into your azure.yaml while holding Shift to automatically add a service to the file with proper tab stops at project, language, and host and enums to help select the right values in those places. Helping you write less YAML, one feature at a time!

A GIF of the drag-and-drop add services feature

Other changes and enhancements

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:

  • Smaller features
    • Support for build-args to Docker builds (azure-dev#1270)
    • Investigate using the GH CLI auth UX in Codespaces (azure-dev#2332)
    • Improved azd package/azd deploy output for Dockerized projects (azure-dev#898)
  • Bug fixes for azd core
    • azd pipeline config with federated credentials now supports different branches (azure-dev#2040, azure-dev#2428)
    • Validate environment exists when running azd env select(azure-dev#2306)
    • azd env refresh alters numeric string value in .env file (azure-dev#2307)
    • azd auth login fails due to reauthentication required, run azd auth login to log in (azure-dev#2299)
    • azd pipeline config results in role assignment error (azure-dev#2287)
    • azd down doesn’t purge cognitive service (azure-dev#1941
    • azd auth login fails after updating to MSAL 1.0 when doing log in for the first time (azure-dev#2258)
    • Action URL is invalid after running pipeline config(azure-dev#2236)
    • Running Bicep fails in a blank Ubuntu container (azure-dev#2197)
    • azure.yaml schema says default shell is “sh” but error says otherwise (azure-dev#2346)
    • Errors interrupt spinner, producing screen output harder to interpret (azure-dev#2353)
    • Forward slashes replaced by backslash for within inline hook scripts (azure-dev#2365)
    • Subscription and location aren’t being saved after provisioning attempt (azure-dev#2325)
    • Remove infrastructure outputs from .env on azd down(azure-dev#2217)
    • Login doesn’t produce nonzero exit code on failure (azure-dev#2221)
  • Bug fixes for Visual Studio Code
    • VS Code issue when running show with no init’d project (azure-dev#2296)
  • Bug fixes for Azure host support (for example, Azure Container Apps and Azure Kubernetes Service)
    • Unable to deploy to a container app that uses workload profiles (azure-dev#2402)
    • azd deployment fails on a valid ingress that has endpoints assigned (azure-dev#2390)
    • Managed HSMs aren’t purged (azure-dev#2348)
    • Container App deploy fails without registry admin user enabled (azure-dev#2244)
    • Service deployment to AKS failure on verification step due to Redis targetPort tag being assigned as string (azure-dev#2270)

Community contributions

We’d also like to extend a special thanks to the community contributors of this release:

You can use the Azure Developer CLI from:

Author

Savannah Ostrowski
Senior Product Manager

Savannah Ostrowski is a senior product manager at Microsoft, focused on Azure cloud native developer tools and experience. She is also the product lead for the open source Azure Developer CLI (azd) and its ecosystem.

0 comments

Discussion are closed.