Azure / Azure/Azure-DataFactory
Global Paramaters not added to ARM templates when "Include global parameters in the ARM template" is checked on
- Dominant language
- PowerShell
- Stars
- 529
- Forks
- 623
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I'm trying to override global params during my ADF deployment in the ADO pipeline but it looks, that for some reason, global parameters are not added to ARMTemplateForFactory.json in Parameters section but instead they are added as resources in the json.file.
My ADF instance is integrated with GIT

I've enabled "Include global parameters in the ARM template"

When I add new global parameter and hit "Publish", I can see new commit to the publish branch and global parameter is added to the ARMTemplateForFactory.json:
```
{
"name": "[concat(parameters('factoryName'), '/default')]",
"type": "Microsoft.DataFactory/factories/globalparameters",
"apiVersion": "2018-06-01",
"properties": {
"ENVIRONMENT_NAME": {
"type": "string",
"value": "DEV"
},
"TEST_GLOBAL_PARAM": {
"type": "string",
"value": "Test"
},
"TEST": {
"type": "string",
"value": "1"
}
},
```
While other params are defined as below at the top of ARMTemplateForFactory.json
```
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"factoryName": {
"type": "string",
"metadata": "Data Factory name",
"defaultValue": "myADF"
},
"AZURE_SQL_connectionString": {
"type": "secureString",
"metadata": "Secure string for 'connectionString' of 'AZURE_SQL'",
"defaultValue": "something"
},
```
All the global params are also missing in ARMTemplateParametersForFactory.json file and I thought that by checking "Include global parameters in the ARM template" they will also be added there....
Then I decided to check arm-template-parameters-definition.json in ADF Studio and I think I know what the problem is...
Is it possible that arm-template-parameters-definition.json has something to do with it?
This is how the beginning of the file looks like when editing it in ADF Studio:
```
{
"Microsoft.DataFactory/factories": {
"properties": {
"globalParameters": {
"*": {
"value": "="
}
}
},
"location": "="
},
"Microsoft.DataFactory/factories/pipelines": {
"activities": [
{
"name": "="
}
]
},
...
```
Then I started checking some articles that I remember and on of them was showing that below should be added to the arm-template-parameters-definition.json
```
"Microsoft.DataFactory/factories/globalparameters": {
"properties": {
"*": {
"value": "="
}
}
},
```
When I added this, global parameters were correctly added to all arm templates.
My question is, why this was not added when I checked in "Include global parameters in the ARM template" option and I had to add it manually?
Contributor guide
Assessment
This issue has not been assessed yet.