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

Vicent Dolz 116 Reputation points
2021-09-27T11:54:26.66+00:00

Hello,

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

135504-realese1.png

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

Templates path:
135572-path.png

With this approach, this error occurred:
135581-release-error.png

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
    2021-10-11T08:25:34.317+00:00

    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
    2021-09-29T17:18:09.73+00:00

    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