AzureCLI – ‘az configure’ | Set defaults for your scripts to use

Just a micro blog to point out a neat feature of the AzureCLI, namely the Configuration settings.

With the command: ‘az configure‘ you can configure your terminal environment to hold a list of ‘default’ key/value pairs of common script parameter requirements:

So, instead of constantly typing a location as ‘uksouth’ or a resource group name as ‘Johns-rg’ for the commands I am running, I can set these as defaults in my session using the following command:

Nice to add at the top of a bash or script file to save a bit of typing any make your scripts a bit neater!

Check out the other features of the az configure command:

Check out the MS Docs page:

Hope this helps your AzureCLI scripting!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s