How can I troubleshoot Azure ARM template validation errors?

前端 未结 8 1715
终归单人心
终归单人心 2021-02-06 22:27

I have made some small changes to an Azure ARM template file and now when I try to deploy or validate via the xplat cli I get this message.

error: Inval

相关标签:
8条回答
  • 2021-02-06 23:06
    az vm list [--only-show-errors]
               [--resource-group]
               [--show-details]
               [--subscription]
    
    0 讨论(0)
  • 2021-02-06 23:08

    Building on nftw's answer...

    To make it faster/easier to find the error issue I used grep and less with a variable as follows:

    $correlationId ='xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' # store your correlation ID here
    Get-AzureRmLog -CorrelationId $correlationID -DetailedOutput | grep -C 10 $correlationID | less
    

    In my testing the error was close to the top of the output. You could use less and the forward-slash key / and search "error" to find the error even quicker.

    0 讨论(0)
提交回复
热议问题