-
Notifications
You must be signed in to change notification settings - Fork 444
Interoperability Bicep to ARM conversion
Bicep is a relatively new Domain-specific language (DSL) and - at the time of writing - not yet in the state of General Availability (GA). For this reason, some people may want to wait for Bicep's General Availability and prefer to use ARM/JSON for the time being.
For these scenarios, the CARML library provides a script that uses the Bicep Toolkit translator/compiler to support the conversion of CARML Bicep modules to ARM/JSON Templates. This page documents the conversion utility and how to use it.
You can find the script under /utilities/tools/ConvertTo-ARMTemplate.ps1
The script finds all deploy.bicep files and converts them to json-based ARM templates by using the following steps:
- Remove existing deploy.json files from folders where deploy.bicep files are also present.
- Convert .bicep files to .json
- Remove Bicep metadata from the converted .json files
- Remove .bicep files and folders
- Update pipeline files - Replace .bicep with .json in pipeline files
For details on how to use the function, please refer to the script's local documentation.
Note: The script must be loaded ('dot-sourced') before the function can be invoked.