I was prompted to update my CLI and wanted to share this easy experience with everyone.
There is an easy straightforward process to check & update your favourite Azure CLI in a few minutes without leaving the command line tool of your choice.
There are 2 commands that you would ever need going forward, assuming that your version of CLI is already “2.x”.
Check your az cli version
Just run the az version --help command first.
Check the AZ CLI version
Running update on AZ CLI
Next, run the az upgrade command and press key Y when prompted to continue.
Upgrade the AZ CLI version
And finally, check the updated version and its extensions if needed.
Verify upraded version and Bicep
In case your AZ CLI is up to date, you could always run az bicep upgrade command and get the job done.
Stay tuned for more Azure automation & Security related posts.
I hope everyone getting a chance to enjoy the summer and spend some time with loved once.
That said – Azure Bicep team does not seem slowing down, and I love it! New features and capabilities have been added to Azure Bicep product v0.4 version, and we will review those innovations on this post.
What is Azure Bicep?
Azure Bicep is a domain-specific language (DSL) that significantly simplifies the Azure resource authoring. It makes representation of your Azure digital estate concise with clean syntax by adding reliable type safety and code-reuse.
A typical Azure Bicep language code for an Azure storage account declaration will look as simple as the following code below – which basically explains why Bicep is called a DSL.
Why would you need it?
There are number of benefits in using Infrastructure-as-Code approach. Azure Bicep might be the right tool for you to use for Azure deployments, especially if you are trying to modernize and simplify the Azure deployment process.
Let’s look into scenarious where Bicep is the right tool to use:
โ๏ธ Want to use language native to Azure? โ๏ธ Looking for fully integrated templates withing Azure platform? โ๏ธ Looking for fully supported product with Microsoft? โ๏ธ Don’t want to keep or worry about your resource state information โ๏ธ Looking to modernize and easy transition from JSON
Well, if your response is YES for above statements/questions then Bicep will be right tool for your solution.
New additions to Azure Bicep in version 0.4
There are numbers of enhancement and features has been added from this release. Let’s look at main Highlights of these features below:
โ Linter MVP – The Bicep linter will inspect your code and catch a customizable set of authoring best practices.ย โ Deprecated parameter modifiers removed – Strip out deprecated parameter modifier syntax โ New code snippets – Suggestion with new code snippets added โ Bug fixes – Number of bug fixes added, thanks to community support โ Bicep Playground fixes – Playground doesn’t load after breaking change. โ Documentation and examples update โ Support for List method call on Azure resource references โ Support for JSON literal string conversion โ Support for using local json templates as modules โ Support for object body completion snippets
What is next?
There are still number of milestones in-front of Bicep team, as the versioning # of Bicep project indicates. That said, starting from Bicep version 0.3 you can get an official Microsoft support.
Below is the sneak-pick preview on what is cooking for v0.5 – which is expected to be out sometimes around August month this year.
After updating to the latest Azure CLI (2.22.0) for Windows 10, I am now seeing the same error as others have reported:
Any command such as “az bicep version” is producing the following error:
The command failed with an unexpected error. Here is the traceback and detailed error: type object 'datetime.datetime' has no attribute 'fromisoformat' Traceback (most recent call last): File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 231, in invoke File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 657, in execute File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 720, in _run_jobs_serially File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 691, in _run_job File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 328, in call File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/init.py", line 807, in default_command_handler File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/resource/custom.py", line 3294, in build_bicep_file File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/resource/_bicep.py", line 63, in run_bicep_command File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/resource/_bicep.py", line 152, in _load_bicep_version_check_result_from_cache AttributeError: type object 'datetime.datetime' has no attribute 'fromisoformat'
Is there a temp workaround?
One of the workarounds is to uninstalled Azure CLI 2.22.0 , and then install the prior version 2.21.0. You could confirm 2.21.0 version is working for you by running the same command.
Hope this will be helpful for you, as i faced with this issue hours before my demo to #GlobalAzure 2021 ๐
Hello eveyone, I am very happy to share exciting news with all of you.
Few days ago, i have receieved an email confirming acceptance of my both Azure sessions for the Global Azure 2021 event. I am truely trilled to present on April 16th and 17th following two sesions for eveyone live:
I am looking forward for your participiation, and tune in to learn about latest developments in Microsoft Azure.
In my first session i will share the following new session with you.
Abstract of the presentation as is:
Infrastructure as a Code (IaC) is important strategy to manage your digital estate in any cloud environment. Simplifying management of your infrastructure while re-using code is even better. In Microsoft Azure, we have ARM (Azure Resource Manager) templates that could declaratively define your cloud project infrastructure.
However, it is not easy to author ARM JSON templates and maintain them when your project grows and requires changes. In this demo heavy session, we will introduce the Azure Bicep language and demonstrate how it simplifies authoring ARM templates for your Azure infrastructure. We will author a manageable, readable, and modularized Azure infrastructure code, while using familiar tools.
TheCloudMarathoner ๐
Please let me know, what topics are you interested in?