1 minute read

With the new release of Bicep (v0.4.1124) it is now possible to export existing Azure resources to Bicep code. This means you do not have to export your resources to ARM and then do a decompile.

Exporting your existing resources is very easy and can be done within Visual Studio Code.

Get Resource ID

To be able to export the resource to Bicep you need to have the resource ID of the resource. You can find this resource very easily by opening the resource within Azure and opening the "properties" blade. One of the properties in this blade is the Resource ID

Export Bicep

To export the template follow these steps:

  1. Open Visual Studio Code
  2. Open an existing "bicep" file or create a new one.
  3. Press ctrl+shift+p or open the command pallet.
  4. Search for "Bicep" and select the option "Insert resource".
  5. This will ask for the resource ID. Paste the resource ID and press enter.
  6. The resource is now imported within your Bicep file.