For testing your mainTemplate.json file, Microsoft has put together a PowerShell as well as an Azure CLI / Bash script for deploying your artifacts to azure and testing the deployment with a predefined parameters file. Both ways (PowerShell / CLI) have the options to upload the artifacts of the template to azure and to simulate a deployment of the template.
The files needed for this testing can be found at https://github.com/Azure/azure-quickstart-templatesfrom the main folder of the repository, download either the Deploy-AzureResourceGroup.ps1 or the az-group-deploy.sh file and place them in a folder of your choice. I will test the files using the PowerShell version of the script, the bash version has some amendments in the switches but is mostly the same.
For Testing it is crucial, that you first login to Azure by starting with an
Add-AzureRmAccount command to authenticate yourself against Azure for the PowerShell session. After you have...