Search code examples
azureazure-rm-template

How I can see the azure arm template output? or any functions like concat or resourceid output for debugging purpose


Wondering how to see the result of any ARM function. for example, concat function used on dependson and it makes the template invalid

It would be great to be able to see how JSON translated from arm functions and parameter before sending to azure

"[resourceId(concat('Microsoft.Compute/virtualMachineScaleSets/', parameters('vmssNamePrefix')),'/extensions/AzureDiskEncryption')]

Solution

  • your snippet should be like this:

    "[resourceId('Microsoft.Compute/virtualMachineScaleSets/extensions', parameters('vmssNamePrefix'), 'AzureDiskEncryption')]
    

    there is no debugging mode, best you can do is use outputs section and test your functions there to see what is being generated

    Reference: https://learn.microsoft.com/en-us/azure/azure-resource-manager/resource-group-template-functions-resource#resourceid