question

Edwin-2061 avatar image
1 Vote"
Edwin-2061 asked danier62 answered

Parametrizing ADF event trigger's storage account for different environments for a larger number of triggers

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"
     }
 }






azure-data-factory
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@Edwin-2061 Thanks for using Microsoft Q&A !!

I do not see unfortunately a way to do that however I am checking internally with the products team if any alternatives. I will update you as soon as I hear back from them. Thanks.

0 Votes 0 ·
SaurabhSharma-msft avatar image
0 Votes"
SaurabhSharma-msft answered SaurabhSharma-msft commented

@Edwin-2061 I have received confirmation from the products team that this is the only approach right now to parameterize the scope property of event trigger. Unfortunately we do not have a way to refactor all those parameters into one right now. Product Team has open an item in their ADO board to investigate on improving this experience.


Please do not forget to "Accept the answer" wherever the information provided helps you to help others in the community.

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@Edwin-2061 Please let me know if you find above reply useful. If yes, do click on 'Mark as answer' link in above reply. This will help other community members facing similar query to refer to this solution. Thanks.

0 Votes 0 ·

@Edwin-2061 Please let me know if you still have any questions.

0 Votes 0 ·
LuYe-6193 avatar image
0 Votes"
LuYe-6193 answered

Any updates from the product team?

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

danier62 avatar image
0 Votes"
danier62 answered

I would also be very much interested on this solution. It is really impractical to manage the large number of scopes in DevOps, even though all of them have the same value.

Any follow up on this?

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.