Unit testing ARM templates

In the case of ARM templates, we define and declare resources using JSON notation. There is no value in testing this JSON file consisting of parameters and resources by parsing it. These templates do not generate any assemblies that can be used for executing unit tests against them. These templates can only be deployed, and so the only way to unit test resources in an ARM template is to unit test them after the deployment of the ARM template. 

For the purposes of this chapter, we will use the next template for unit testing. This template is available with this chapter's accompanied code file named chapter-6 - listing1.txt. This template creates five resources:

  • Azure Storage account
  • Azure Virtual Network
  • Azure public ...

Get Azure Resource Manager Templates Quick Start Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.