-
Notifications
You must be signed in to change notification settings - Fork 4k
Open
Labels
ARMService AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.customer-reportedneeds-team-attentionThis issue needs attention from Azure service team or SDK teamThis issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Description
Description
I have noticed that when I do deployment with New-AzDeployment I can get the following error:
Error: 10:11:51 - Error: Code=InvalidTemplate; Message=Deployment template validation failed: 'Template parameter JToken type is not valid. Expected 'Object'. Actual 'String'. Please see https://aka.ms/resource-manager-parameter-files for usage details.'.
The error does not hint where the problem is. If we look at the activity log for the same error we actually see more detailed error message:
"statusMessage": "{\"error\":{\"code\":\"InvalidTemplate\",\"message\":\"Deployment template validation failed: 'Template parameter JToken type is not valid. Expected 'Object'. Actual 'String'. Please see https://aka.ms/resource-manager-parameter-files for usage details.'.\",\"additionalInfo\":[{\"type\":\"TemplateViolation\",\"info\":{\"lineNumber\":5,\"linePosition\":30,\"path\":\"parameters.approvedLocations\"}}]}}",
Az deployments should include the full error so you can troubleshoot easier and do not have to go to activity log.
Steps to reproduce
New-AzDeployment
Environment data
Module versions
Az.Resources 3.2.1
Debug output
N/A
Error output
N/A
Metadata
Metadata
Assignees
Labels
ARMService AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.customer-reportedneeds-team-attentionThis issue needs attention from Azure service team or SDK teamThis issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that