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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.