10
votes

My ARM template resource group deployment fails in VSTS.

I get an error without any specific reference to parameter that has an issue: "One of the deployment parameters has an empty key. Please see https://aka.ms/arm-deploy/#parameter-file for details."

The referenced url contain general information, with one comment asking the same question, but no answer to it. Person asking it alluded that it may have something to do with the version of the deployment step (2.*) and it not using Powershell anymore. I went though the template back and forth comparing parameters in BeyondCompare and nothing sticks out...

Does anyone know what does this error mean?

6
can you share the template?4c74356b41
What's the result if you deploy it manually on your machine? Can you provide the template code? Try to set system.debug to true (variable), then check whether there is detail error message after building.starian chen-MSFT
I will try deploying it from my local machine to Azure, but its an infrastructure ARM template so there is no building it... this ARM template has over 300 lines, which is too long to paste in here.matendie

6 Answers

23
votes

I had the same issue and found out that some parameters has a space in their values. So you should write -adminUsername "$(vmuser)". This works for me

3
votes

Check Your parameter key or value does not have space in between. if your value required space then, use "". check this link.

Example,

direct value -param1 "Value with Space"

value from pipeline variables -param1 "$(valueFromVariables)".

1
votes

We had the same as matendie; a space between the dash and the parameter name:

- pricingTier "standard"

^ note the space

1
votes

It means you've got a parameterkey in your deployment template without a name. For example "-" instead of "-parametername" or "- parametername" (notice the space).

It can also happen if you manage to paste an 'em-dash' (e.g. from a web browser) instead of a standard dash.

0
votes

So, I'm not sure what the issue was, but I gave up on trying to identify the problem, and I deleted the release definition. Recreating it from scratch using the same template, works fine now...

Maybe the definition got some how corrupted. Not sure, but new one is not having this issue.

Thanks

0
votes

In my case the problem was with template parameters override. I needed to put parameter value in quotes - "DEV" on screenshot below.

enter image description here