The Azure Developer CLI – A Walk Through
Tags: azure, cli, azd
Published: 2022-08-31 10:46:00

## A new CLI is in town
When you are working with Azure you certainly heard of and are using the [Azure CLI](https://docs.microsoft.com/cli/azure/). While this is a great tool for create and manage Azure resources, it covers only one part of the typical development loop of building applications.

Wouldn’t it be great to have a CLI that covers more of the development loop and that allows a templating of your application including the infrastructure and maybe even a build pipeline. I think it would be and obviously Microsoft has the same opinion. 

May I introduce you to the [Azure Developer CLI](https://docs.microsoft.com/en-us/azure/developer/azure-developer-cli/) or `azd` for short. 

The CLI went into [public preview](https://devblogs.microsoft.com/azure-sdk/introducing-the-azure-developer-cli-a-faster-way-to-build-apps-for-the-cloud/) in July 2022 and aims to support developers to build, deploy and secure their application following best practices.

I like this idea and that is why I created a series of videos looking at the different aspects of `azd` and hopefully give you a first glance at this new tool. I shortly outline the content of these videos in the following sections. As an app I took the ToDo sample app and as host I used the Azure Container Apps as sample throughout the series. 

## Episode 1 – Getting started

This [episode](https://youtu.be/eLiD3E7tPYo) is the starting point. It shows an end-to-end walkthrough of deploying the sample Azure Container app and infrastructure.
<a href="https://youtu.be/eLiD3E7tPYo">
  <img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wiw49gywilrb5wlvqogo.png" alt="YouTube Azure Developer ClI - Episode 1">
</a>

## Episode 2 - Walkthrough Template Code

In this [episode](https://youtu.be/0JU-tH4l-QQ) we walk through the code of the Azure Developer CLI Template for Node.js with the Azure Container Apps host. We check it structure and derive what part contributes to which aspect of the `azd` flow. 
<a href="https://youtu.be/0JU-tH4l-QQ">
  <img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jvsayk4wtkeay0bu5anx.png" alt="YouTube Azure Developer ClI - Episode 2">
</a>

## Episode 3 - Closer look at azd

While the first episode used the `azd up` command, in this [episode](https://youtu.be/1xGbZRqEkb0) we take a closer look at the Azure Developer CLI commands especially for initialization, provisioning, and deployment of a project that are wrapped by `azd up`. 
<a href="https://youtu.be/1xGbZRqEkb0">
  <img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g54gyw0zrlmr4b4jsf44.png" alt="YouTube Azure Developer ClI - Episode 3">
</a>

## Episode 4 - Monitoring

In this [episode](https://youtu.be/O7o68rdtas0) we take a quick look at the topic of monitoring that is provided by `azd`. Not too breath taking, but a got starting point supporting the flow outlined by the CLI.  
<a href="https://youtu.be/O7o68rdtas0">
  <img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jadaamd8t8ua7s17vl08.png" alt="YouTube Azure Developer ClI - Episode 4">
</a>

## Episode 5 - Debugging the project

This [episode](https://youtu.be/kAag7kqheD4) highlights another beautiful aspect of the CLI namely the ability to run and debug the application in a hybrid setup. 
<a href="https://youtu.be/kAag7kqheD4">
  <img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gx0erymf5do4sztfxbcf.png" alt="YouTube Azure Developer ClI - Episode 5">
</a>

## Episode 6 - Deployment Pipeline on GitHub

This [episode](https://youtu.be/CTvYclsUDSo) investigates on the features for setting up a deployment pipeline with `azd` i. e. setting up a GitHub Actions flow. 
<a href="https://youtu.be/CTvYclsUDSo">
  <img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ehhk8ihekche2mr3j30r.png" alt="YouTube Azure Developer ClI - Episode 6">
</a>

This [episode](https://youtu.be/8aYp1izOijk) wraps things up and walk through other interesting parts of the documentation that allow you to get a better understanding of the CLI and how it works. 
<a href="https://youtu.be/8aYp1izOijk">
  <img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p1ak34i2d9fbxfdxavkr.png" alt="YouTube Azure Developer ClI - Episode 7">
</a>

## Summary

First things first: the CLI is in public beta, so it is not feature complete. However there a solid roadmap with features that I would have asked for, so nothing special on my wish list that is not yet on the roadmap

Having said that, the CLI is already quite good and can be used in projects when the restrictions concerning the hosts are okay for your project. The usability looks good to me, maybe some edges can be smoothed, but no severe issues as far as I have tried things out. 

Overall, the CLI can be a huge win for companies and their platform teams when providing blueprints/landing zones for their developers. The design of the CLI and the templates should really help with this and reduce the necessity for developers to make decisions on things that do not contribute to their original task namely developing (business) applications. 

Talking about the templates: I think the ToDo templates are really good, and I also saw some further templates that are tagged as azd templates. However, I missed the clear structure that the “real” sample apps provided in most of them. It is also not 100% clear to me how the community clould contribute templates and contributing to templates is not crystal clear to me, making variants of the templates, would be cool to have some curated “community” area with templates from the community for the community, but let’s see what the future will bring here.

Overall, I really liked my first steps with the CLI and I am looking forward to its upcoming evolution. 

## References:
- [Official announcement blog post]( https://devblogs.microsoft.com/azure-sdk/introducing-the-azure-developer-cli-a-faster-way-to-build-apps-for-the-cloud/)
- [azd on Microsoft docs](https://docs.microsoft.com/ azure/developer/azure-developer-cli/)
- [azd samples](https://github.com/topics/azd-templates) on GitHub
- [Playlist on YouTube](https://youtube.com/playlist?list=PLmZLSvJAm8FbFq2XhqaPZgIzl6kewz1HD)