ARM模板-验证参数

时间:2019-05-28 04:42:21

标签: azure-resource-manager arm-template

我创建了一个简单的JSON,它创建了一个存储帐户。引入类型为object的参数后,出现验证错误。

"parameters": {
  "storageAccountType": {
    "type": "string",
    "defaultValue": "Standard_LRS",
    "allowedValues": [
      "Standard_LRS",
      "Standard_GRS",
      "Standard_ZRS",
      "Premium_LRS"
    ],
    "metadata": {
      "description": "Storage Account type"
    }
  },
  "location": {
    "type": "string",
    "defaultValue": "Australia East",
    "metadata": {
      "description": "Location for all resources."
    }
  }, "objectToConvert": {
    "type": "object"

}

章鱼的输出

{"storageAccountType":{"value":"Standard_LRS"},"location":{"value":"Australia East"},"objectToConvert":{"value":[{"a":"b"},{"c":"d"},{"c5":"d"},{"6a":"b"},{"cfg":"d"}]}} 

我确定由于参数objectToConvert导致了问题的出现。

objectToConvert的值是从Octopus传递的,并且是

enter image description here

错误

enter image description here

1 个答案:

答案 0 :(得分:0)

将数据类型从对象更改为数组后问题解决了