0

We are maintaining the definition of our Logic App in an ARM template. The app has multiple email triggers. Currently, each trigger is hard-coded in the ARM template. The solution is growing and we'd like to keep adding triggers, ideally without updating the arm. Is it possible to create triggers dynamically at deployment time, basing on the list provided as parameter? E.g. email_trigger_1 for mailbox test1@test.com, email_trigger_2 for mailbox test2@test.com etc. I'm looking for smth similar to arm-copy, which doesn't work in this case.

Frant
  • 5,382
  • 1
  • 16
  • 22
filip
  • 1,444
  • 1
  • 20
  • 40

1 Answers1

0

You can try using a PowerShell automation script. I assume you have your ARM template already ready ( for reference follow this ).

  1. Create a PowerShell script and put the deployment command : https://learn.microsoft.com/en-us/azure/logic-apps/logic-apps-deploy-azure-resource-manager-templates#deploy-with-azure-powershell

  2. Capture the status of the deployment. If it returns success then update the deployment ( ARM) template using PowerShell commands and save the file : How do I update JSON file using PowerShell https://intellipaat.com/community/10659/update-json-file-using-powershell

  3. While updating the template you can update the counters for the required trigger names and other properties for your next deployment