How to write Azure Resource Management Template

Kohei Akiyama
2 min readJan 18, 2020

--

I’m following this flow.

1. Implement the finished product on the Azure Portal
2. Export the template on the Azure Portal
3. Edit on Visual Studio Code
4. Deployment test on the Azure Portal(go back one step if there is a problem)

Implement finished product on Azure Portal

If there is no finished product, nothing goes on to check the operation.
Write based on what you have.

Export template on Azure portal

Export the template as described in the following document.

It needs a lot of times to write from scratch, so it is quick to export.

It’s a bit sad that parameters like Subscription Id and Resource Group Name are hard-coded.
When I wrote this on Twitter, a PM-like person responded, so I replied, but there was no reply afterwards. . .

Edit on Visual Studio Code

Visual Studio Code is highly productive because it also has editor extensions as follows.

The parameters are rewritten here.
The functions that can be used in the template are as follows. Around `concat` and` resourceId` will be almost required.

In addition, depending on the type of resource, you may come across a situation such as “What should I do in such a case?”
In such a case, find the same situation from the following official template collection and refer to it.
For example, there are quite a few unnecessary definitions in the downloaded template, even if they are written, so it is useful to determine how much to delete.

Deployment test on Azure portal

Deploy using the completed template and check that the deployed resources work as expected.

How to deploy using the template is as follows.

--

--

Kohei Akiyama
Kohei Akiyama

Written by Kohei Akiyama

Azure Solution Architect / especially focused PaaS,DevOps

No responses yet