I have a larger number of ADF event triggers and I need to parametrize the storage account in Azure DevOps for different environments. I have used arm-template-parameters-definition.json to create the necessary parameters like so:
"Microsoft.DataFactory/factories/triggers": {
"properties": {
"typeProperties": {
"scope": "="
}
}
}
But since I have a couple dozen of these triggers this generates a unique parameter for each trigger even though the actual value will be the same across all parameters (not just the default but any change as well). Below is an example of the result.
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"Example1_CSV_Trigger_properties_typeProperties_scope": {
"value": "/subscriptions/x/resourceGroups/y/providers/Microsoft.Storage/storageAccounts/z"
},
"Example2_CSV_Trigger_properties_typeProperties_scope": {
"value": "/subscriptions/x/resourceGroups/y/providers/Microsoft.Storage/storageAccounts/z"
},
"Example3_CSV_Trigger_properties_typeProperties_scope": {
"value": "/subscriptions/x/resourceGroups/y/providers/Microsoft.Storage/storageAccounts/z"
},
"Example4_CSV_Trigger_properties_typeProperties_scope": {
"value": "/subscriptions/x/resourceGroups/y/providers/Microsoft.Storage/storageAccounts/z"
},
"Example5_CSV_Trigger_properties_typeProperties_scope": {
"value": "/subscriptions/x/resourceGroups/y/providers/Microsoft.Storage/storageAccounts/z"
},
"Example6_CSV_Trigger_properties_typeProperties_scope": {
"value": "/subscriptions/x/resourceGroups/y/providers/Microsoft.Storage/storageAccounts/z"
...
}
}
Managing and overwriting all of these in Azure DevOps is impractical. Is there a way for me to have single parameter that could control all triggers scopes? Either by changing the arm-template-parameters-definition.json so that it generates a single parameter (like below) or by using some other Azure DevOps functionality?
{
// This single parameter would be used by all triggers...
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"CSV_Trigger_properties_typeProperties_scope": {
"value": "/subscriptions/x/resourceGroups/y/providers/Microsoft.Storage/storageAccounts/z"
}
}