Conversion of Azure ARM templates to Azure Bicep
For existing ARM templates used as infrastructure as code resources of your projects, can easily be converted to Azure Bicep format with the help of simple “ az bicep decompile” command.
An existing ARM template code for Data analytics project is already used for provisioning resources like Azure Event hub, Stream Analytics, Azure Databricks, Azure SQL database, SQL data warehouse, PowerBI embedded etc.
Here goes the general architecture of the analytics pipeline.
Here goes the ARM viewer visuals of the Azure data analytics resources.
In order to convert the existing ARM template for these Azure resources infrastructure code to Bicep, the following command has to be executed.
az bicep decompile — file ./azuredeploy.json
Upon execution, you can see automatically , the relevant .bicep code file has generated with the appropriate “param”, “variable”, “module”, “resource”, “output” declarations etc. You may be have to tweak the bicep code a bit on top of the generated code as per the requirements.
Here goes the Bicep code file visual representation of the resources
You can view the ARM template “azuredeploy.json” file of the analytics project here in this following link on GitHub along with its converted .bicep file.
Bicep CLI installation is one of the pre-requisites for BICEP decompilation from ARM templates. Once the BICEP cli is installed, you can view the its related cmdlets.
az bicep — help
The state management for Azure Bicep happens in Azure itself, so here no need to manage state in a separate state file & store in remote storage etc.