I created a cluster through the Azure portal and I'd like to make some updates to it through the ARM templates. I have made the necessary edits to the template (specified placement constraints) and I'm using this script to deploy to the remote cluster. I'm getting an error message 'The value of deployment parameter 'abc_xyz' is null. Please specify the value or use the parameter reference'. The value for that parameter is defined in my ARM template but it is null in the parameters.json:
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"abc_xyz" : {
"defaultValue" : "abc_xyz_name",
"type": "String"
},
}
Parameters.json:
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"abc_xyz" : {
"value": null
},
For this example, assume that the parameter "abc_xyz" refers to a public address of an azure resource (storage account, load balancer, etc). Am I missing something here? Why is my deployment failing?
In your parameter.json, your abc_xyz
value is null
, it means that you need provide value when your deploy the template. In the main template, you don't need use defaultValue
. You could modify your template as below:
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"abc_xyz" : {
"type": "String"
},
}