Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Missing parameter in parameters.json error with azure-cli v0.10.5 #92

Closed
ahmetb opened this issue Nov 14, 2016 · 5 comments
Closed

Missing parameter in parameters.json error with azure-cli v0.10.5 #92

ahmetb opened this issue Nov 14, 2016 · 5 comments

Comments

@ahmetb
Copy link

ahmetb commented Nov 14, 2016

README says:

Generated templates can be deployed using the Azure XPlat CLI (v0.10 only)

I have v0.10.5, however the examples/kubernetes.json template output I got does not have "nameSuffix" parameter in _output/Kubernetes-*/azuredeploy.parameters.json file and therefore it fails with error:

zure group deployment create --template-file azuredeploy.json --parameters-file azuredeploy.parameters.json --resource-group ahmetb-k8s
info:    Executing command group deployment create
error:    Template and Deployment "parameters" objects lengths do not match
	Deployment Parameter file does not have { nameSuffix } defined.
error:   Error information has been recorded to /Users/alp/.azure/azure.err
error:   group deployment create command failed
@colemickens
Copy link
Contributor

nameSuffix should have a default value in azuredeploy.json and thus is not required in the azuredeploy.parameters.json file.

Can you check and see if that's the case?

@ahmetb
Copy link
Author

ahmetb commented Nov 14, 2016

@colemickens it does have a value in azuredeploy.json, but the node-based CLI requires the value to be declared in parameters.json anyway I think. I've seen this happening before in other projects, so I think it's by-design behavior.

@colemickens
Copy link
Contributor

What would be the point of having default values in the template then?

@anhowe
Copy link
Contributor

anhowe commented Nov 15, 2016

If there is a default value, it is not required in the parameters. The powershell behavior should be the standard here, so please submit a bug to CLI team. Also, why are you using 0.10.5 since the readme says only use 0.10.0, as anything > 0.10.0 can create broken deployments.

@colemickens
Copy link
Contributor

I thought we fixed this so the docs were less ambiguous? I already filed a bug on xplat-cli. I'll send a PR to cleanup the language about what version of xplat-cli to use.

@ahmetb ahmetb closed this as completed Nov 15, 2016
jim-minter pushed a commit to jim-minter/acs-engine that referenced this issue Apr 10, 2018
don't hardcode minor version number
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants