Export Azure resource group template

A useful functionality in Azure that has entered preview a few weeks ago is the ability to export a resource group as a template.
This is very handy when you want to automate your environment setup or perhaps securely store your infrastructure setup in your source-control-of-choice.

 Here's how it works when you're doing it from the portal:


  1. Navigate to a resource group
  2. Select "Settings"
  3. In the Settings blade, hit "Export template"

 As the Export Template blade unfolds you'll be presented with the following view that show you the actions available as well as the actual template itself.


The Export template blade will not only show you the layout and contents of your arm template, but also the available parameters that affect your template:


Adding to that there's three more tabs that help you deploy the template..


.. CLI


.. Powershell


.. .NET / C#

Since this functionality is currently in preview you might end up trying to export a resource that's not supported at this point. If that happens, you'll see something like this in the blade:


To work around that you can always add the missing resource(s) manually after you've exported the template.

To act on your template you have 3 options:


Creates a zip file with the template along with all the sample deployment files as well.
 Save Template
Gives you the opportunity to save the template in Azure so that you can use it later via Browse > Templates.
Creates a custom deployment based on the template.