Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global Paramaters not added to ARM templates when "Include global parameters in the ARM template" is checked on #681

Open
h00jraq opened this issue Jul 10, 2024 · 0 comments

Comments

@h00jraq
Copy link

h00jraq commented Jul 10, 2024

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
image

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

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant