Monday 13 November 2017

Azure breaking change for Sitecore ARM templates

Over the weekend it seems Microsoft has changed one or more functions in the way ARM templates are processed and we're now getting the following error when trying to spin up our Sitecore environments:

New-AzureRmResourceGroupDeployment : 5:45:07 PM - Error: Code=InvalidTemplate; Message=Deployment template validation failed: 'The template resource 'templateLinkBase' at line '27' and column '23' is not valid: The template language function 'replace' expects its first parameter to be of type 'String'. The provided value is of type 'Uri'. Please see https://aka.ms/arm-template-expressions for usage details.. Please see https://aka.ms/arm-template-expressions for usage details.'.

The simplest workaround is to temporarily include the templateLinkBase parameter in your parameters file, containing the URL to your ARM template file:

{
  "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "templateLinkBase": {
      "value": "https://<yoursite>/sitecore/templates/azuredeploy.json"
    },
    ... other parameters
  }
}

It seems a few others are having the same issue and have raised it with Microsoft.  Is anyone else out there experiencing this? I thought it would have been all over the forums but I haven't seen it there yet.

Update: Microsoft has now responded and confirmed the issue (with a bit of an ugly workaround).  Hopefully they'll fix the issue soon!

No comments:

Post a Comment