Azure ARM Templates Tips and Tricks 2: Use “Microsoft.Resources/deployments” resource type to create template hierarchies by nesting them

Dividing templates up to small templates has many advantages, such as:

  • Reuse, reference common resource templates from parent templates
  • Unit testing, divide smaller deployments, and test those small deployments independently. So you do not have to wait the whole template to finish, just to see a failure on a different part
  • Maintenance & management of larger more complex templates
  • Imitating conditionals (please see previous trick)

Example of this technique can be found in the resources created by the azuredeploy.json template. The documentation for this feature is very well hidden in this article :)

Next tip