Recently I was working with a Sitecore Azure environment and the client wanted to test the new 9.02 version of Sitecore with a separate test environment. Sitecore offer ARM templates for each of their versions as part of the Azure marketplace which makes it very simple to spin up an environment. There are 3rd party dependencies with Sitecore the main ne being SOLR which is an open source enterprise search engine that unfortunately isn’t offered in Azure as a PaaS service. Instead it needs a VM. It also isn’t included in the ARM templates.
The client did have another resource group with a SOLR VM setup for their live environment. As it was a Production server I didn’t want to touch it, instead what I wanted was a copy.
A relatively new feature in Azure is automation options. I can select a resource group and generate the template of all the resources in the group. In this instance it was useful as the SOLR has some security settings applied that I wanted to maintain. After some tweaks I deployed the template using PowerShell.
While this is a simple example, ARM templates become very powerful if you have complex resource groups with many different services and configuration settings. They allow you to spin up on demand via code clones of your live environment which you can use for testing or part of a DevOps process.