Awesome, Lesser Known Azure CLI Extensions

Saturday, February 20, 2021

As awesome as Azure CLI / azcli is out of the box, did you know that there are a couple of lesser known extensions that can really make a difference in your daily workflow? Today I want to highlight three extensions that I use quite frequently, FZF, Self-Destruct and Show-Deployment.

FZF for Azure CLI

What is it?

FZF is a command-line fuzzy finder that can be used on practically any list. FZF for Azure CLI extends this to enable a much more flexible way of setting the default subscription, location, or resource group within your Azure CLI session

screenshot of az fzf

How do I get it?

You can install it by running the following Azure CLI commands:

az extension install --name fzf
az fzf install

How do I use it?

It’s as simple as running az fzf followed by subscription, group, or location.

Self Destruct for Azure CLI

What is it?

Do you ever create something “temporary” in Azure and forget to clean it up until the end of the month when you see the bill? This extension intercepts az * create commands and lets you schedule automatic destruction of the resource. Please note, this only fully works on the Windows Subsystem for Linux, Linux, and MacOS (I assume) platforms.

How do I get it?

Follow the instructions here.

How do I use it?

When you create Azure Resource Manager resources through az * create, add the flag --self-destruct followed by a time interval like 1d, 6h, 2h30m, 30m, etc. A Logic App and Managed Identity will be provisioned in the resource group to delete the resource (or resource group) after that time has passed along with the Logic App itself.

Show Deployment for Azure CLI

What is it?

Do you ever find yourself wondering what the status or state of a current deployment is? This extension allows you to “watch” the deployment as it happens - handy for long running portal deployments that you can watch from the CLI.

screenshot of show deployment

How do I get it?

Follow the instructions here.

How do I use it?

Just run az group deployment watch --resource-group followed by the resource-group you want to watch. It’ll show you the status of the current deployment, or the last run deployment if none are currently in-progress.

azurecliazcli

Remote Whiteboarding for Online Meetings

Managing Python Versions on Windows with pyenv-win

comments powered by Disqus