One of the buzz words in the DevOps words is this “Infrastructure as Code” thing, and the Azure ARM Templates are a good example of how it would look like.

The basic idea is you use a template (in this case it would be a .json file) for deployment and that template will be used to deploy your component to different environments such as testing, staging, and production.

Not if you keep these template in Source Control, boom, you have your Infrastructure as Code!

Shoe me how to create an Azure ARM templates

There are several ways, you can do this. You can export these templates from Azure portal if you have already have them deployed to Azure, or you can start from scratch using the Azure Resource Manager documentation, or use the hundreds of samples available on github and take it from there.

However today I would like to show you how to make these ARM templates from Visual Studio and a project template that is provided by the Azure development tools for Visual Studio.

For this demo, I will use the Visual Studio 2017 Community edition, so if you don’t have it installed already you can download and install it from here.

While installing the Visual Studio, make sure you check the Azure development section like the following picture.