Azure Toolkit ARM template deployment issue

  • Description

    From November 10 to November 15, 2017, Sitecore ARM templates were broken after Microsoft made some changes to the Azure system. When a Sitecore XP solution was deployed to Azure using the Azure Toolkit or Azure Marketplace, the following error occured:

    {"error":{"code":"InvalidTemplate","message":"Deployment template validation failed: 'The template resource 'templateLinkBase' at line '27' and column '25' 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.'."}}

    There is a deployment().properties.templateLink.uri property in the Sitecore ARM templates that used to be a string. However, due to recent changes introduced by Microsoft, the type has been changed from string to Uri. This issue is mentioned on the MSDN forum.

  • The issue was fixed by Microsoft on November 15, 2017. We can confirm that Provisioning via Azure Marketplace and Azure Toolkit now works as expected.

  • Historical Workaround

    When the issue was active, to resolve it, you had to add the templateLinkBase parameter to the parameters.json file with a value that corresponds to the folder that contains the azuredeploy.json file used to invoke a deployment.

    For example, if you use the following command to start the deployment process:

    Start_SitecoreAzureDeployment –ArmTemplateUrl "https://raw.githubusercontent.com/Sitecore/Sitecore-Azure-Quickstart-Templates/master/Sitecore%208.2.3/xp/azuredeploy.json" 

    Copy the whole URL without the azuredeploy.json part:

    https://raw.githubusercontent.com/Sitecore/Sitecore-Azure-Quickstart-Templates/master/Sitecore%208.2.3/xp/

    Add this URL to the parameters.json file:

    "templateLinkBase": { "value": "https://raw.githubusercontent.com/Sitecore/Sitecore-Azure-Quickstart-Templates/master/Sitecore%208.2.3/xp/" }

Applies to:

Managed Cloud 1+, Azure Toolkit 1+, CMS 8.2 Update-1+

CMS 8.2 Update-1+, Managed Cloud 1+, Azure Toolkit 1+

November 13, 2017
November 15, 2017

Keywords: 

  • Azure
  • ,
  • Managed Cloud