Export Azure Resource Groups Templates

by Carlos Mendible on 06 Apr 2016 » Azure, DevOps, dotNet

One of the great things about Azure is the possibility to Export Azure Resource Groups Templates. Each template is a json file containing the exact configuration of the services you’ve provisioned in a Resource Group.

Using this templates you can treat your Infrastructure as code and repeatedly deploy your application during every stage of the application lifecycle in the same way, each and every time.

Navigate trough the following tabs to learn how to export your Azure Resource Groups Templates

Azure PortalPowerShellAzure CLI
  1. Loging to the Azure portal
  2. Navigate to the Resource Group blade
  3. Click on Settings
  4. Once in the Settings blade click on Export template
  5. In the Export resource group template blade click Save Template
Resource Group BladeResource Group Settings Blade Export Resource Group Template Blade With the latest release of Azure Powershell now it's possible to export your resource group template using the following command: ``` powershell Export-AzureRmResourceGroup -ResourceGroupName [-Path ] ``` Using Microsoft Azure Cross Platform Command Line and the following command you can save the template for the specified resource group. ``` powershell azure group export [directory] ``` **04/15/2016 UPDATE:** Now you can get the **.Net** code needed to automate your **Azure Resource Manager templates** deployments from code!!! Export Resource Template to .NET
  1. Loging to the Azure portal
  2. Navigate to the Resource Group blade
  3. Click on Settings
  4. Once in the Settings blade click on Export template
  5. In the Export resource group template blade click .NET
Hope it helps!