Skip to main content
Azure
  • 1 min read

Announcing template export feature in Azure Resource Manager

Today, we are excited to announce the preview of the template export feature in response to requests for the ability to export a resource group as a template.

Today, we are excited to announce the preview of the template export feature in response to requests for the ability to export a resource group as a template. In this blog post, I will show you 3 new ways you can interact with templates.

Export template from a running resource group

In Azure portal, you can pick your current resource group and select Export template in Settings. Once the template is exported, you can download the template file or trigger a new deployment from the portal. You can also find the PowerShell script and CLI script you can use to deploy the template.

image

To export the template from PowerShell, you can run the following:

 

 

 Export-AzureRmResourceGroup -ResourceGroupName  [-Path ] [-IncludeParameterDefaultValue []] [-IncludeComments 
    []] 

To do it from CLI, you can run the following:

azure group export  [directory]

Export template from previous deployment

You can also select a particular deployment from your deployment history and then export the template and parameters that were submitted. Select the deployment and click Export template.

 

image

To export the template from previous deployment using PowerShell, you can run the following:

 

 Save-AzureRmResourceGroupDeploymentTemplate -DeploymentName  -ResourceGroupName  [-Path ] 

 

To do it from CLI, you can run the following:

group deployment template download [options]   [directory] 

Automation Option in Create

The other option is to view the template that the portal will submit on your behalf in Create experience by clicking on Automation Options.

image

 

Give a try yourself! And we’re looking forward to your feedback.