0

I m trying to install cloudera on azure using the link below https://github.com/Azure/azure-quickstart-templates/tree/master/cloudera-on-centos It gave me a few errors, below deploy cloudera on centos Required property 'resources' not found in JSON

I solved it. BUT I m now stuck at some point. "message": "Deployment template validation failed: 'The template 'copy' definition at line '0' and column '0' is missing a copy input value.

I use copy for resources, not for properties, there is no need for input value.

{
      "type": "Microsoft.Network/publicIPAddresses",
      "name": "[concat(variables('publicIPAddressName'), copyIndex())]",
      "location": "[parameters('location')]",
      "copy": [{
        "name": "publicIPLoop",
        "count": "[parameters('vmCount')]"
      }],
      "properties": {
        "publicIPAllocationMethod": "Dynamic",
        "dnsSettings": {
          "domainNameLabel": "[concat(parameters('dnsNamePrefix'), '-dn', copyIndex())]"
        }
      }
    }
old_timer
  • 69,149
  • 8
  • 89
  • 168
stefanb
  • 23
  • 5

2 Answers2

1

copy should look like this:

  "copy": {
    "name": "publicIPLoop",
    "count": "[parameters('vmCount')]"
  },

its an object, not an array

4c74356b41
  • 69,186
  • 6
  • 100
  • 141
  • Initially there was no bracket , it gave me another error: "message": "Deployment template validation failed: 'The template resource 'master-node' at line '493' and column '9' is not valid: The template function 'copyIndex' is not expected at this location. The function can only be used in a resource with copy specified. I googled and saw the post https://stackoverflow.com/questions/49270901/copyindex-error-in-arm-template I put the brackets, which does not make sense, according to https://learn.microsoft.com/en-us/azure/azure-resource-manager/resource-group-create-multiple – stefanb Dec 19 '18 at 06:00
  • the `[]` syntax is needed for properties copy, not for regular copy. this should work right now, at least the part you are showing in your question is valid if you implement this fix – 4c74356b41 Dec 19 '18 at 07:21
  • THANKS for your prompt response. Again I receive the error that I used to receive without bracket. "message": "Deployment template validation failed: 'The template resource 'master-node' at line '493' and column '9' is not valid: The template function 'copyIndex' is not expected at this location. The function can only be used in a resource with copy specified. Please see https://aka.ms/arm-copy for usage details. – stefanb Dec 19 '18 at 14:24
  • well, thats another resource. i suggest you accept this answer and start a new question with this error – 4c74356b41 Dec 19 '18 at 14:30
  • ok, as you say. https://stackoverflow.com/questions/53800940/deploy-cloudera-on-azure-failed-error-with-json-arm-template-function-copyin/53854513#53854513 – stefanb Dec 19 '18 at 15:36
0

THANKS A LOT for your response, Initially there was no bracket , it gave me another error: "message": "Deployment template validation failed: 'The template resource 'master-node' at line '493' and column '9' is not valid: The template function 'copyIndex' is not expected at this location. The function can only be used in a resource with copy specified. Please see https://aka.ms/arm-copy for usage details.. Please see https://aka.ms/arm-template-expressions for usage details.'."

I googled it, and I saw the post copyindex() error in arm template

I put the brackets, to make it an array, and now it asks me for input, which does not make sense, according to https://learn.microsoft.com/en-us/azure/azure-resource-manager/resource-group-create-multiple

stefanb
  • 23
  • 5