How to use/create ARM templates for deployments


I was building a lab for the creation of a Hybrid Connection Manager (HCM) link between an Azure App Service and an Azure VM within a VNET.  In most cases, yes, you use HCM to access resources hosted within a another network (not always on Azure), but I didn’t have one of those and therefore created the VNET with a HCM and WEB server within it.  As seen in Figure 1, I have a VNET, a VM, an App Service and all the other required features necessary to support those Azure features.

image

Figure 1, automatic deployment on Azure using ARM templates

Once the original, manual deployment completed, I selected the Automation script link on the Resource Group blade and saved the script.  See Figure 2.

image

Figure 2, download automatic deployment on Azure using ARM templates

There is a very nice description of how to then use these scripts to deploy here.  See the other related articles as well on that same page where it discusses not only deploying using PowerShell, but also using CLI and via the portal.

Once I downloaded the script, I deleted the resource group.

Using the Template deployment feature, then selecting ‘Build your own template in the editor’ I was able to upload the template which I downloaded previously.

image

Figure 3, upload automatic deployment on Azure using ARM templates

Load the TEMPLATE.JSON file into the editor by selecting the Load file button, then click the Save button as shown in Figure 4.

image

Figure 4, upload and save automatic deployment on Azure using ARM templates

After selecting Save, review the output, agree to the Terms and Conditions, then select the Purchase button.  After some modifications:

I was able to successfully deploy, Figure 5.

image

Figure 5, deploy automatic deployment on Azure using ARM templates

Although it did take some time, it completed successfully and was a happy person.

To get a overview of the project I worked on, read the following articles as well.

Comments (0)

Skip to main content