1
votes

Using ARM template from here: https://raw.githubusercontent.com/elastic/azure-marketplace/7.6.0/src/mainTemplate.json

Created a parameters file (snippet only, more params in actual) for ARM template deployment thru terraform:

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

Error message: Template validation failed: Required property 'type' not found in JSON. Path 'parameters._artifactsLocation', line 7, position 5."

Do we need to specify the property "type" in parameters file?

2

2 Answers

0
votes

no, fix this:

"_artifactsLocation": {
    "value": "https://raw.githubusercontent.com/elastic/azure-marketplace/7.6.0/src/"
},
0
votes

Fixed:

The below params are not needed:

  "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json##",
  "contentVersion": "1.0.0.0",
  "parameters": {

After removing them, no more template validation failures. Some parameters files don't need these headers.

reference: https://github.com/Azure/azure-sdk-for-python/issues/482