gpt4 book ai didi

azure - 错误 :The deployment parameters are using case sensitive names. 错误参数名称 : name.(ARM 模板部署)

转载 作者:行者123 更新时间:2023-12-03 05:30:18 25 4
gpt4 key购买 nike

我正在创建用于创建路由表的 ARM 模板。从模板部署下载的简单 ARM 模板失败。运行 ARM 模板后,它会询问名称并抛出以下错误。

enter image description here

我尝试过使用诸如routeVnet、vnetroute 等名称。看到一些帖子,其中在名称中给出小写大写的组合可以解决问题。但在这里不起作用。

ARM 模板:

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

最佳答案

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

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

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

关于azure - 错误 :The deployment parameters are using case sensitive names. 错误参数名称 : name.(ARM 模板部署),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65987602/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com