Deploy Azure Template from Portal

Lots of the time when you see Azure Templates in the wild, they’re accompanied by “Deploy to Azure” buttons that allow you to click them and launches straight into Azure. You then enter any parameters and click deploy and you’re done. Unfortunately this doesn’t work for everyone – especially if you have multiple directories. I found that when clicking on these blue buttons I got launched into the wrong directory – making it impossible for me to Deploy to Azure Buttondeploy to the directory I wanted.


Fortunately it’s simple to deploy from a template without clicking on one of the magic blue buttons.

Step 1: Get your template

First off, find the template json file. This is the file that Azure loads in when you click on the magic deploy buttons. If you don’t know where this is then look at the source of the button and you’ll see something like this:

<a href="">
    <img style="max-width:100%;" data-canonical-src="" alt="Deploy to Azure" src="">

Note that in the <a> tag the href attribute starts with ““. This is the link to azure. The remainder of the URI is the URL of the template json file. Copy the string after /uri/ and url-decode it. You’ll get something like below:

Voila! Now paste that URL in your browser and copy the contents of the file.

Step 2: Deploy the Template in AzurePortal Template Deployment

Next go to the Azure portal ( and click the “New” button. In the search box at the top type in “Template Deployment”, and select the first result with the same name in the search results. Click the blue “Create” button at the bottom of the next pane.

In the Custom Deployment Pane select “Edit Template”. Clear the text box and paste in the template you copied earlier. Click Save at the bottom.

Back in the Custom Deployment Pane finish specifying template Parameters, and other information such as resource group and region.

Once you finish entering information click Create and your template will be created in Azure, Huzzah!

, ,

No comments yet.

Leave a Reply

Proudly made in Canada