Azure 101: ARM Template Tooling in the Azure Portal

Share on facebook
Share on twitter
Share on linkedin
Now that I am back at Microsoft, I thought that I would get back to my Blog/Vlog content that I used to create pretty regularly when I was here the last time. I also thought that it would be good if I started out with a topic that is inspired by some customer work that I am doing right now. This topic is not necessarily anything new considering that the features I am going to be discussing have been around for a few years, but not everyone knows that they exist and even more don’t necessarily know the best ways to take advantage of them.
 
What I am going to be discussing and demonstrating in this article are the tools that  Microsoft provides to help make the deployment process of solutions and architectures as quick and efficient as possible using the ARM template paradigm. These tools can also be used to help make the development process of your Solutions as Code, also known as Infrastructure as Code, quicker and more efficient. Lastly, I will also talk about the new templating language that Microsoft has been developing for the last couple of years: Bicep and how you make some quick migrations to that new language.

Export Template

This first tool that I would like to focus on is the “Export Template” function that can be found in the Navigation bar for every resource within the Azure Portal. This feature will tell the Azure Portal to automatically generate a hard coded template of the individual resource that you are currently working with. If however, you are looking at a resource group and its contents, then you will get a template for every resource within that template.
 
I mentioned that it provides a hard coded version of the resource or set of resources which is very important to know. It is important to know because it could affect how you will want to use this generated template.
 
There are two common use cases for generating these templates:
  • Backup/Disaster Recovery – Keeping a hard coded version of a resource or set of resources will allow you to redeploy that exact solution should a disaster ever occur
  • Multiple Deployments – Should you want to have multiple deployments of a solution that all look the same, but may have different names, different IP schemes, different location, etc. Then starting from a hardcoded version of a template is a great way to start your development process. You won’t have to worry so much about the ARM schema and only worry about the parameterization process that you will need to succeed with your multiple deployments.
Let’s now take a look at the “Export Template” feature in a demonstration:

Resource Explorer

The next tool to look at is the “Resource Explorer”. This particular tool provides a number of different ways that you can view the entire JSON version of every resource that has been deployed within a given Azure Active Directory tenant. It provides a navigation tree on the left that will allow you to traverse the resource tree within your subscription(s) with the collections setup either by Resource Group or Resource Provider.
 
The Resource Provider is how Microsoft categories each service within their REST API. (i.e Virtual Networks are part of the Microsoft.Network Resource Provider.)
 
Keep in mind, the “Resource Explorer” contains a complete JSON representation of the resource which may include some properties that are not available for you to actually create or modify within a given ARM template. These type of properties are specifically used by the Azure APIs and not for customer use. Let’s take a look at the Resource Explorer from a pretty empty Subscription perspective to understand what you can see and what you can do:

Deployments

The last area to look at and understand is the Deployments capability within the Azure Portal. Unlike the other two tools,  the features for ARM template Deployments do not all fall under the same header or function.
 
Within the scope of Resource Groups you have access to a “Deployments” function where you can see all the different deployments that have occurred within the scope of the Resource Group. This can be a Portal based deployment that adds a new resource to the RG or a modification to an existing resource, but it  will also show any deployments that have been processed through any CLI based deployment as long as the deployment was run against the selected Resource Group.
 
Each deployment listed, will give you access to the following pieces of information:
  • An overview of the deployment process as well as some recommended links for possible next status
  • A list of all Input values provided to the deployment for each of the resources
  • Any outputs that may have been generated through the deployment. This will be completely dependent on the types of resources being deployed
  • Access to the Azure generated template of the deployment, but only for what was in the deployment, not necessarily everything in the resource group

Deploy a Custom Template

The last area of functionality that the Azure Portal provides is a Custom Deployment wizard for ARM templates. This wizard will walk you through the process of starting from a QuickStart template, create a brand new template from scratch and deploying it or import an existing template from your local hard drive. You can also do a quick copy/paste from a site like GitHub if you don’t have the template that you want to use on your local hard drive.
 
Once you have the template available within the editor window and you are happy with it, you can fill out all of the available parameters that are specified within the template and kickoff the deployment. This will give you a resource by resource walk through of the deployment and allow you to view any status messages that are generated for each of those resources. This can be a much more user intuitive way of testing out your deployments, but I would definitely not recommend this for  a long-term approach. The more long-term approach would be to include your deployments in your DevOps pipelines using something like Azure DevOps or GitOps within GitHub.
 
As a final demonstration, let’s take a look at this last tool within the Portal:

Conclusion

Hopefully you can see the power of the tooling that Microsoft provides for ARM template development and deployment within the Azure Portal. All of these tools are available to all customers for free and once you know what each one does, they can certainly help you get through your development and deployment process faster and more efficiently. I have been using these tools for 5+ years and they have most certainly helped me hit everyone of my promised timelines when working with customers.

Additional Resources

Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn

You may aso like

Cloud Architect – Gamer – Instructor