Bulk exporting ARM and Bicep templates for multiple resources in Azure using Powershell

Jack Roper
CodeX
Published in
3 min readOct 11, 2021

--

Automate Everything!

Overview

The Azure portal only allows one resource to be exported at a time to an ARM template, and currently, you cannot directly export Bicep templates at all through the portal. You can export the entire contents of a resource group to a template that contains the combined resources, but this combines the resources into a single template.

Exporting every resource one by one when you have many to export quickly becomes time-consuming, let's automate it!

Exporting an ARM template for an Azure resource from the Portal

As an example, I have an alert I want to export an ARM template for. I find it in the portal:

Click on the Properties button:

And choose the ‘Export Template’ button

--

--

Jack Roper
CodeX

A blog about DevOps & Cloud Tech. Specializing in Terraform, Kubernetes, Azure & Azure DevOps! ☁️