从此处使用ARM模板:https://raw.githubusercontent.com/elastic/azure-marketplace/7.6.0/src/mainTemplate.json
通过terraform为ARM模板创建了一个参数文件(仅片段,实际还有更多参数):
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json##",
"contentVersion": "1.0.0.0",
"parameters": {
"_artifactsLocation": {
"value": "https://raw.githubusercontent.com/elastic/azure-marketplace/7.6.0/src/"
},
"_artifactsLocationSasToken": {
"value": ""
},
"esVersion": {
"value": "${esVersion}"
},
"esClusterName": {
"value": "${esClusterName}"
},
"loadBalancerType": {
"value": "external"
},
"loadBalancerInternalSku": {
"value": "Basic"
}
}
}
错误消息:模板验证失败:在JSON中找不到必需的属性'type'。路径'parameters._artifactsLocation',第7行,位置5。”
我们需要在参数文件中指定属性“类型”吗?
答案 0 :(得分:0)
不,解决此问题:
"_artifactsLocation": {
"value": "https://raw.githubusercontent.com/elastic/azure-marketplace/7.6.0/src/"
},
答案 1 :(得分:0)
已修复:
不需要以下参数:
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json##",
"contentVersion": "1.0.0.0",
"parameters": {
删除它们后,不再有模板验证失败。某些参数文件不需要这些标题。