How I would use Azure templates and parameters today

At first look on the template and parameter example files, it doesn’t look obvious to what goes where. Other than variables goes in the template and string goes in the parameters, but then it doesn’t make sense to me, does it to you?

What if we converted all variables to strings? I did that, and it worked:
https://github.com/RoyApalnes/Azure-Repo/blob/master/Parameters3.json

https://github.com/RoyApalnes/Azure-Repo/blob/master/VirtualMachineTemplate3.json

The VM was deployed exactly the same, so all my variables could become strings.

The template now describes a single VM with one network interface, one OS drive, one public ip, one dns name, etc. Making it a template for a standard virtual machine in Azure.

The parameter now describes each single virtual machines unique configuration, like the network interface name, vm name, machine name, public ip name, vm size, etc. Making it a documentation of each individual server.

 


Leave a Reply

Ehlo!

I am Roy Apalnes, a Microsoft Cloud Evangelist working av Sopra Steria. Main focus in Microsoft Security and Endpoint Management, with a bigger picture in mind.

Featured Posts

    %d bloggers like this: