Questions? Feedback? powered by Olark live chat software
Hopp over navigasjon

Announcing template export feature in Azure Resource Manager

Posted on 30 mars, 2016

Program Manager, 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. 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 <String> [-Path <String>] [-IncludeParameterDefaultValue [<SwitchParameter>]] [-IncludeComments 
    [<SwitchParameter>]] 

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

azure group export <name> [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 <String> -ResourceGroupName <String> [-Path <String>] 

 

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

group deployment template download [options] <resource-group> <name> [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.