Test-AzResourceGroupDeployment does not return validation output or error properly #27594
Labels
ARM - Templates
bug
This issue requires a change to an existing behavior in the product in order to be resolved.
Service Attention
This issue is responsible by Azure service team.
Description
Test-AzResourceGroupDeployment does not return a powershell object of any kind and it's result is not capturable into a powershell variable for some reason.
$TestResult = Test-AzResourceGroupDeployment
Will result in $TestResult containing nothing when the validation test was successful even when set to verbose and a verbose output is displayed:
"VERBOSE: 12:44:15 PM - Template is valid."
$TestResult = Test-AzResourceGroupDeployment
Will result in $TestResult containing a single return character when the validation test was unsuccessful but verbose, no matter what the error or how many.
Even attempting to direct the error output into a variable via -ErrorVariable
Test-AzResourceGroupDeployment -ErrorVariable $TemplateValidationErrorVariable
results in $TemplateValidationErrorVariable being empty.
Issue script & Debug output
Environment data
Module versions
Error output
The text was updated successfully, but these errors were encountered: