Product Management

Deploying ARM templates using Azure DevOps and Microsoft Forms

By Łukasz Zera on November, 19 2020
2 minute read

Stay up to date

Back to main Blog
Łukasz Zera

Certified Azure architect with 3 years of experience. On a daily basis, he deals with cloud solutions: from migration to the cloud, through maintenance and optimization of existing solutions, ending with designing data processing systems.

In this article we will show how to deploy ARM template in Azure using Azure DevOps and integrate it with Power Automate to trigger deployment using variables provided with Microsoft Forms. We will use simple virtual machine template to fulfill this example.

 

In Azure DevOps:

Go to pipelines > Releases > New Pipeline

 

Start with Empty job.

 

Once you click an Empty job, you should see the following options:

 

Now you need to add an artifact. We will use Azure Repos as our repository:

 

Then you need to add task to our Stage.

 

After this you need to edit stage settings, choose proper subscription, resource group and other settings. Then choose template file which you previously put in your Azure Repos:

 

In Override template parameters you can map template parameters with pipeline variables to make them configurable with your form later. These variables are just an example. You can configure any parameter of the template.

You also need to check if you have set-up these variables in Variables tab:

 

All you need to ensure is to define these variables without predefined value and mark “Settable at release time” checkbox.

Now you have all set. Now save our pipeline and move to Microsoft Forms where we should create simple form:

 

Then move to Power Automate, then Create new automated flow and put the following steps:

When new response is submitted

Get response details

Create new release

 

In the first two steps, find your newly created form. In the third step, set your Devops Organization, project and release, then map release variables with form responses.

Save flow and submit new form response.

As you can see, when you submit new response, new release in Azure DevOps is created:

 

Congratulations!

You have deployed new, configurable Azure Virtual Machine using Microsoft Forms.

Stay up to date