
close
close
In today’s Ask the Admin, I’ll show you how to export resource groups (RGs) as Azure Resource Manager (ARM) templates.
advertisment
One of the great features of ARM is the ability to define how Azure resources interconnect with one another using resource groups, and deploy cloud applications, in the web-based management portal or using PowerShell, and then copy and redeploy that configuration using a declarative JSON template. If you need a primer on ARM and Azure resource groups, see Deploy VMs Using Azure Resource Manager, What is JSON and How Is It Used?, and What are Microsoft Azure resource groups? on the Petri IT Knowledgebase.
In this article, I want to show you how easy it is to copy ARM-based deployments in Azure, and either save the configuration for later use as a JSON template, or deploy a new resource group based on the configuration of an existing set of resources. For example, I have a resource group called PetriWeb that contains several VMs, public IP addresses, a virtual network, storage, and other resources that make the application work. But I need to reproduce this configuration so that I can test some proposed changes in a lab environment. Azure allows the PetriWeb resource group to be exported and redeployed with a different name using the JSON template generated during the export process.
Before starting, you’ll need an Azure account. If you don’t already have one, you can sign up for a free trial here.
advertisment
Export an Azure resource group as a template (Image Credit: Russell Smith)
Azure will now generate a JSON template based on the selected resource group.
Exported ARM template (Image Credit: Russell Smith)
advertisment
You also have the option to deploy the resources defined in the template without leaving the portal GUI.
It’s worth noting here that you may need to change some of the prepopulated values in the step above if the names given are in use elsewhere in your Azure subscription, otherwise preflight validation of the template might fail.
Deploying a resource group using an ARM template (Image Credit: Russell Smith)
Once the deployment has completed, the new resource group will be accessible from the Azure portal dashboard, or by browsing your resource groups.
In this article, I showed you how to export Azure resource group configurations to ARM templates.
More from Russell Smith
advertisment
Petri Newsletters
Whether it’s Security or Cloud Computing, we have the know-how for you. Sign up for our newsletters here.
advertisment
More in Cloud Computing
Use Azure ExpressRoute Private Peering & Azure Virtual WAN to Connect Privately to Microsoft 365
Apr 21, 2022 | Flo Fox
Microsoft to Make Changes to Cloud Licensing Restrictions after Customer Complaints
Apr 18, 2022 | Rabia Noureen
Most popular on petri
Log in to save content to your profile.
Article saved!
Access saved content from your profile page. View Saved
Join The Conversation
Create a free account today to participate in forum conversations, comment on posts and more.
Copyright ©2019 BWW Media Group