ARMTemplate dev deployment error: InvalidContentLink LinkedTemplate format (PoweShell Script)

Vicent Dolz 116 Reputation points


I'm trying to do a DEV deployment to STG environment.
This is the structure I've run for the release deployment:
The first issue I had was a resources limit exceeded:


Then I decided to move to LinkedTemplate format, with one master file referencing 48 child files.

Templates path:

With this approach, this error occurred:

Does anyone have any idea how to solve this?

Thank you in advance.

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,084 questions
{count} votes

Accepted answer
  1. Vicent Dolz 116 Reputation points

    I tried it without using the parameter file and an absolute path readable by azure and it didn't work either. So finally I used the Azure PowerShell task to deploy from DEV to STG and then with a trigger to PRD. The script reads all existing ARMTemplate in the working folder, it overrides the factoryName to the higher environment , and then deploys them in order following the dependencies from 0 to max. AzurePS_deployment_script

    for ($num = 0; $num -lt $max_value; $num++ ){
        Write-Host "Deploying ArmTemplate_$num.json"
        $deploymentFilePath = "$scriptPath\ArmTemplate_$num.json"
        #Read json template, override the previous dataFactoryName and write into the same json template file  
        (Get-Content $deploymentFilePath).Replace("bi-dev-datafactory", $dataFactoryName) | Set-Content $deploymentFilePath
        #Deploy command
        New-AzResourceGroupDeployment -Name $dataFactoryName -ResourceGroupName $resourceGroupName -TemplateFile $deploymentFilePath -verbose
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. MartinJaffer-MSFT 26,056 Reputation points

    Hello @Vicent Dolz and welcome to Microsoft Q&A.
    That last message is saying you need to write out the path explicitly without parameters, I think.

    0 comments No comments