azureazure-rm-templateroutetable

Error :The deployment parameters are using case sensitive names. The error parameter name(s): name.(ARM template deployment)


I am creating ARM template for Route table creation. A simple ARM template downloaded from the template deployment is failing. After I run the ARM template, it asks for the name and throws the below error.

enter image description here

I have tried giving names like routeVnet, vnetroute etc. Saw some posts where giving the combination of lowercase uppercase in name will fix the issue. But it doesn't work here.

The arm template:

 {
        "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
        "contentVersion": "1.0.0.5",
        "parameters": {
            "name": {
                "type": "string"
            },
            "location": {
                "type": "string"
            },
            "tagsByResource": {
                "type": "object",
                "defaultValue": {},
                "metadata": {
                    "description": "Optional tags provided by the user via createUiDefinition.json"
                }
            },
            "disableBgpRoutePropagation": {
                "type": "bool"
            }
        },
        "variables": {},
        "resources": [
            {
                "apiVersion": "2019-02-01",
                "type": "Microsoft.Network/routeTables",
                "name": "[parameters('name')]",
                "location": "[parameters('location')]",
                "tags": "[ if(contains(parameters('tagsByResource'), 'Microsoft.Network/routeTables'), parameters('tagsByResource')['Microsoft.Network/routeTables'], json('{}')) ]",
                "properties": {
                    "disableBgpRoutePropagation": "[parameters('disableBgpRoutePropagation')]"
                }
            }
        ],
        "outputs": {}
    }

The parameter template:

{
    "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
    "contentVersion": "1.0.0.0",
    "parameters": {
        "location": {
            "value": "eastus"
        },
        "Name": {
            "value": ""
        },
        "tagsByResource": {
            "value": {}
        },
        "disableBgpRoutePropagation": {
            "value": true
        }
    }
}

Solution

  • The problem is with your parameter file where you are passing parameter name as "Name", in template your parameter is name while in parameter file you have mentioned it as Name.

    The correct parameter file will look like:

    {
        "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
        "contentVersion": "1.0.0.0",
        "parameters": {
            "location": {
                "value": "eastus"
            },
            "name": {
                "value": "routeVnet12"
            },
            "tagsByResource": {
                "value": {}
            },
            "disableBgpRoutePropagation": {
                "value": true
            }
        }
    }