copy and deploy Azure logic apps from Subscription A to Subscription B using powershell
I would like to copy and deploy Azure logic apps from Subscription A to Subscription B.
I have followed below steps
- Export logic app template from Subscription A and save the template file
- edit the template and update resource group and subscription id
- Execute az deployment group create --subscription XXXX -resource-group XXXX --parameters para_file -template-file template_address
The above approach is working as expected for basic logic apps. I am facing the problems when a logic app has resources attached to it for example blob storage , subscription plan.
how can I ensure that the logic app template is dynamic and it is able to create the resources in the target subscription ( Subscription B ) dynamically. it looks like I would need to edit template file manually before the deployment.
Is there any easy way to copy and deploy logic apps to a new subscription and a new resource group along with its dependencies without manaully modifying the template ?