Using Azure CLI

There are two tools az (Azure CLI) and azd (Azure Developer CLI). Both serve different purposes but are complementary to each other.
Azure CLI Azure Developer CLI
Purpose General-purpose command-line tool High-level developer-focused CLI
Use Case Manages Azure resources and configurations. Manages end-to-end Azure workflows and applications.

1. Azure CLI

1.1 Install

Install it:
 brew install azure-cli
Check it works:
az --version
It should show the installed version. As of 2025/01/01 my Azure CLI version is 2.67.0.

1.2 Login

To login do the following command. It will open a browser where you can login. When the login is done it will communicate the CLI.
az login
Since Azure CLI version 2.61.0, you are able to select the Subscription at login time. Just follow the instructions in the CLI and input the number that corresponds to the desired subcription. More in the official docs.

1.3 List Resource Groups

List resorces groups in a nice table. If you prefer the json format just omit --output table.
az group list --output table

2. Azure Developer CLI

2.1 Install

Install it (More in the official docs.):
brew tap azure/azd && brew install azd
Check it works:
azd version

2.2 See help

There are various subcommands like init, up, etc. See a list of them in the help:
azd --help

0 comments :

This work is licensed under BSD Zero Clause License | nacho4d ®