File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -400,13 +400,14 @@ while ($runCount -le $NumberOfIterations)
400400 " vaultName" = $keyvaultName ;
401401 " windowsOSVersion" = $osVersion ;
402402 " secretUrlWithVersion" = $kvSecretId }
403- if (-not (Test-AzureRmResourceGroupDeployment - ResourceGroupName $CanaryVMRG - TemplateFile .\azuredeploy.json - TemplateParameterObject $parameters ))
403+ $templateError = Test-AzureRmResourceGroupDeployment - ResourceGroupName $CanaryVMRG - TemplateFile .\azuredeploy.json - TemplateParameterObject $parameters
404+ if (-not $templateError )
404405 {
405406 New-AzureRmResourceGroupDeployment - Name $templateDeploymentName - ResourceGroupName $CanaryVMRG - TemplateFile .\azuredeploy.json - TemplateParameterObject $parameters - Verbose - ErrorAction Stop
406407 }
407408 else
408409 {
409- throw [System.Exception ] " Template validation failed. Please check for errors in your template "
410+ throw [System.Exception ] " Template validation failed. `n $templateError "
410411 }
411412 }
412413
You can’t perform that action at this time.
0 commit comments