Azure / Azure/azure-cli

Missing question mark for nested linked templates (BadRequest - Unable to download deployment content)

Open
#22,266 2 comments 0 reactions 2 assignees Claimed by @cxznmhdcxz View on GitHub
act-identity-squad ARM Auto-Assign customer-reported
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

**Describe the bug**
When deploying linked templates in Azure Data Factory, during the execution request to the nested linked templates does not contain question mark between path and SAS token, causing multiple BadRequest responses for each nested template.

```
ERROR: MultipleErrorsOccurred - Multiple error occurred: BadRequest,BadRequest,BadRequest,BadRequest,BadRequest,BadRequest,BadRequest,BadRequest,BadRequest,BadRequest. Please see details.
BadRequest - Unable to download deployment content from 'https://.........ArmTemplate_0.jsonsp=..... The tracking Id is '.....'. Please see https://aka.ms/arm-deploy for usage details.
BadRequest - Unable to download deployment content from 'https://.........ArmTemplate_1.jsonsp=..... The tracking Id is '.....'. Please see https://aka.ms/arm-deploy for usage details.
```

**To Reproduce**
Deploy linked ARM templates for ADF from location in ADLS with SAS token:

```
az deployment group create
--resource-group $ADF_RESOURCE_GROUP
--name $ADF_DEPLOYMENT_NAME
--template-uri "https://......./ArmTemplate_master.json"
--query-string $SAS_TOKEN
--parameters containerUri="https://....."
--parameters containerSasToken=$SAS_TOKEN
--debug
```

**Expected behavior**
Requests should contain question mark between path and SAS token and access json templates.

**Environment summary**
az cli version - 2.33.1

**Additional context**
As a temporary workaround, you can add question mark in **ArmTemplate_master.json** at the end of each path with sed command:
`sed -i "s/\.json', parameters/\.json?', parameters/g" ArmTemplate_master.json
`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.