Implementing Azure Resource Manager Templates
Share this post
Now that you have a good understanding of Azure Resource Manager, you are ready to learn how to implement and deploy Azure Resource Manager templates. This step demonstrates how to implement Azure Resource Manager templates using a variety of tools.
Deploying Templates from the Azure Portal
Deploying templates from Marketplace:
From the Azure Portal, you can deploy using a template from the Marketplace:
- Select New from the portal, then the type of resource you wish to deploy, and then the version of the resource.
- Set the properties and deploy.
- Add more resources by using the Add command on the resource group blade.
Deploying Custom Templates:
From the portal, you can also deploy a custom template that defines the infrastructure for your solution.
- After your template is created, select New from the portal and search for Template Deployment
- Select it from the available resources.
- After launching template deployment, open a blank template and in the editor, add the JSON syntax that defines the resources you wish to deploy.
- Select Save.
Deploying Azure Quickstart Templates:
You can also select a template contributed by the community from the Azure quickstart templates.
- To deploy resources from a template already saved to your account, browse your saved templates.
- Select the one you wish to work on, and deploy it:
NOTE: If you have new ideas or templates that you created and would like to share to open source, submit a pull request on GitHub to the Microsoft Repo.
Deploying Templates from the Azure CLI:
azure group create -n examplegroup -l "West US"
**azure group deployment create -f
c:MyTemplatesexample.json -e
c:MyTemplatesexample.params.json -g examplegroup -n exampledeployment
- Leaves unchanged resources that exist in the resource group but are not specified in the template.
- Adds resources that are specified in the template but do not exist in the resource group.
- Does not reprovision resources that exist in the resource group in the same condition defined in the template.
- Reprovisions existing resources that have updated settings in the template.
- Deletes resources that exist in the resource group but are not specified in the template.
- Adds resources that are specified in the template but do not exist in the resource group.
- Does not reprovision resources that exist in the resource group in the same condition defined in the template.
- Reprovisions existing resources that have updated settings in the template.
Deploying Templates with PowerShell:
New-AzureRmResourceGroup -Name ExampleResourceGroup -Location "West US"
New-AzureRmResourceGroupDeployment -Name ExampleDeployment -ResourceGroupName ExampleResourceGroup -TemplateFile
c:MyTemplatesexample.json -TemplateParameterFile
c:MyTemplatesexample.params.json
NOTE: There are more options available to you for specifying the resources to deploy. For more options on how to specify the resources to deploy with Azure PowerShell, see Deploy resources with Resource Manager templates and Azure PowerShell.
Deploying Templates with Rest API:
PUT https://management.azure.com/subscriptions/<YourSubscriptionId>/resourcegroups/<YourResourceGroupName>/providers/Microsoft.Resources/deployments/<YourDeploymentName>?api-version=2015-01-01
<common headers>
{
"properties": {
"templateLink": {
"uri": "http://mystorageaccount.blob.core.windows.net/templates/template.json",
"contentVersion": "1.0.0.0",
},
"mode": "Incremental",
"parametersLink": {
"uri": "http://mystorageaccount.blob.core.windows.net/templates/parameters.json",
"contentVersion": "1.0.0.0",
}
}
}
GitHub Resource Manager QuickStart Templates
Azure Resource Manager Template Visualiser Tool
- From the Azure portal, select Resource Groups.
- Select the resource group name that you want to export.
- Select Export template.
You should see a JSON template from the Resource Group.
- Click Save to file and provide a filename: filename.JSON
- Visit the Azure Resource Manager visualiser and import the JSON template to visualise it:
Join the discussion
In the last two steps you’ve learned about the structure of Azure Resource Manager Templates and how to implement and deploy ARM templates. Use the structure provided in the previous section to write an ARM template that you can deploy in your environment. Share your ARM template with the group.Use the Discussion section below and let us know your thoughts. Try to respond to at least one other post and once you’re happy with your contribution, click the Mark as complete button to move on to the next step.
Share this post
Microsoft Future Ready: DevOps Development, Implementation and Azure Automation

Microsoft Future Ready: DevOps Development, Implementation and Azure Automation

Reach your personal and professional goals
Unlock access to hundreds of expert online courses and degrees from top universities and educators to gain accredited qualifications and professional CV-building certificates.
Join over 18 million learners to launch, switch or build upon your career, all at your own pace, across a wide range of topic areas.
Register to receive updates
-
Create an account to receive our newsletter, course recommendations and promotions.
Register for free