Search code examples
azureazure-cognitive-searchazure-rm-template

ARM Template - conflicting update


There is ARM template for provisioning two Azure Search services

"resources": [
{
  "type": "Microsoft.Search/searchServices",
  "name": "[parameters('serviceName')]",
  "apiVersion": "[parameters('serviceApiVersion')]",
  "location": "[parameters('location')]",
  "properties": {
    "sku": {
      "name": "[parameters('sku')]"
    },
    "replicaCount": 1,
    "partitionCount": 1,
    "hostingMode": "[parameters('hostingMode')]"
  }
},
{
  "type": "Microsoft.Search/searchServices",
  "name": "[concat(parameters('serviceName'), 'secondary')]",
  "apiVersion": "[parameters('serviceApiVersion')]",
  "location": "[parameters('location')]",
  "properties": {
    "sku": {
      "name": "[parameters('sku')]"
    },
    "replicaCount": 1,
    "partitionCount": 1,
    "hostingMode": "[parameters('hostingMode')]"
  }
}]

Deployment of ARM Template provisions one search service and fails another with response:

{
  "error": {
    "code": "Unknown",
    "message": "There was a conflicting update. No change was made to the resource from this request. RequestId: b65a51b5-cd87-4dc5-82d9-9041ddd1c2dc",
    "target": null,
    "details": null
  }
}

Does anyone face issue like that?


Solution

  • Perhaps search services cannot be concurrently provisioned in the same resource group. Try adding a "dependsOn" property to the second search service.