Validate ARM Template

Validate the ARM template.


It is important that we vaidate our ARM template before publishing. There are a number of specific best practice checks that will be performed on the template as part of the publishing process to meet the certification requirements for Azure Applications. Many of these are automated in the Azure Resource Manager Template Toolkit. If the ARM template does not conform it will fail certification.

Install the ARM template test toolkit

  1. The tests require PowerShell. If you don’t have PowerShell installed, install PowerShell Core for your OS.

  2. Download the latest zip ARM Temlate Toolkit file and extract it to a suitable folder

  3. In PowerShell, navigate to the folder in the previous step

  4. You may need to modify your execution policy for the script to work

    1. Execute the following PowerShell command in the arm-ttk folder

      Get-ChildItem *.ps1, *.psd1, *.ps1xml, *.psm1 -Recurse | Unblock-File
  5. Import the module

    1. Execute the following PowerShell command

      Import-Module .\arm-ttk.psd1
  6. For more details, see Use ARM template test toolkit

Run the tests

  1. Execute the following PowerShell command to run the tests. It may be easier to make a copy of the ARM template a save it in the arm-ttk folder

    Test-AzTemplate -TemplatePath \path\to\template_to_be_tested

    Arm template test toolkit output sample

  2. Review the results and address any issues


Help us improve

Azure Citadel is a community site built on GitHub, please contribute and send a pull request

 Make a change