Converting ARM to Bicep
You have become familiar with both ARM and Bicep templates and may find yourself wanting to now reuse your existing ARM templates as Bicep templates. The following section will outline the steps involved in converting your template using the VS Code extension for Bicep, as detailed earlier in the chapter.
Prerequisites
There are a couple of items you need in place to be able to convert ARM to Bicep:
- Installation of the Bicep extension on VS Code.
- Configuration of the Bicep extension as described earlier in the chapter to allow for the automatic conversion of JSON to Bicep. You must ensure the setting for
Decompile On Paste
is enabled as per Figure 11.8:
Figure 11.8: The Decompile On Paste setting
Converting an Existing ARM File to Bicep
To convert your ARM file, you should follow these steps:
- Open VS Code.
- Create a new Bicep file and save it.
- Open your existing ARM template, select all the...