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

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

我正在为路由 table 创建创建 ARM 模板。从模板部署下载的简单 ARM 模板失败。在我 运行 ARM 模板之后,它要求输入名称并抛出以下错误。

我试过给 routeVnet、vnetroute 等命名。 看到一些帖子,其中给出名称中小写大写的组合将解决问题。但是这里不行。

手臂模板:

 {
        "$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": {}
    }

参数模板:

{
    "$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
        }
    }
}

问题出在您的参数文件中,您将参数 name 作为“名称” 传递,在模板中,您的参数是 name 而在参数文件中你提到它为 Name.

正确的参数文件如下所示:

{
    "$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
        }
    }
}