How can I troubleshoot Azure ARM template validation errors?

前端 未结 8 1731
终归单人心
终归单人心 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: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.

提交回复
热议问题