Reputation: 4001
I was changing an ARM template (including linked templates) that was working for months. After building successfully, when deploying I got the error
New-AzureRmResourceGroupDeployment : A parameter cannot be found that matches parameter name '_artifactsLocationSasToken'
Upvotes: 4
Views: 12211
Reputation: 581
In my case, the error was caused by an invalid template path (parameter -TemplateFile
). I had defined another parameter in the template file, but since the deployment command could not find the template itself, it could also not find the value for my user-defined parameter inside the template.
It seems that this error is a generic message invoked by Powershell, if the supplied parameter is empty. It would be nice the New-AzureRmResourceGroupDeployment
command would perform some validation of the parameters, like checking if the template file exists and if the format of the template file is valid... These generic PS error messages are not very helpful.
Upvotes: 3
Reputation: 4001
I knew that uploading artifacts sometimes is a somewhat sensitive business, so I checked out corresponding posts to get hints - among them this one that seemed helpful. But nothing had an effect, so I took a break.
After coming back I thoroughly checked my template and
Hence my take on that: do not rely on the Build process; don't get misled by the error message; when having this kind of error re-check the template, even shrink it down to isolate invalid areas
Upvotes: 9