I want to deploy an Azure ressource. The variables used in the template are declared in a dedicated parameter file. However, when deploying the template I'm getting the following error:
New-AzResourceGroupDeployment -ResourceGroupName $resourceGroup -TemplateUri $templateUri -TemplateParameterUri $paramUri
New-AzResourceGroupDeployment : 10:13:17 - Error: Code=InvalidTemplate; Message=Deployment template validation failed: 'The value for the template parameter 'sku' at line '22' and column '16' is not provided. Please see https://aka.ms/arm-deploy/#parameter-file for usage details.'.
"sku" is the parameter and is defined as:
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"sku": {
"value": {
"name": "Standard_B1s",
"tier": "Standard",
"capacity": 1
}
}
}
}
and it is called/used like this
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"sku": {
"type": "object"
}
},
"variables": {},
"resources": [
{
"comments": "",
"type": "Microsoft.Compute/virtualMachineScaleSets",
"sku": "[parameters('sku')]",
"name": "SomeName",
"apiVersion": "2018-06-01",
"location": "westeurope",
"scale": null,
"properties": {}
}
],
"outputs": {}
}
I'm using the way to call parameters this way in a different template without a problem.
Do some of you spot the error?