Reputation: 87
I have multiple logic app with corresponding ARM template. Now, I want to merge different ARM templates into one ARM template and deploy the multiple logic app at the same time via AZURE-DEVOPS pipeline.
Upvotes: 2
Views: 1707
Reputation: 18958
For your scenario, you need firstly make change to your ARM template structure.
For example, I want to combine 4 ARM templates into one ARM template. So that I can just use one ARM template deploy
task to deploy 4 services.
Now, I need create a combined ARM templates file with below structure:
Repo ArmDeploy
| Nested Templates
| | NestOne
| | | NestOne.json
| | | NestOne.parameters.json
| | NestTwo
| | | NestTwo.json
| | | NestTwo.parameters.json
| | NestThree
| | | NestThree.json
| | | NestThree.parameters.json
| | NestFour
| | | NestFour.json
| | | NestFour.parameters.json
| azuredeploy.json
| azuredeploy.parameters.json
For the contents of azuredeploy.yml
and azuredeploy.parameters.yml
, you can check the sample and the description from this doc, along with this one.
Now, it is available to use only one ARM deploy
task to deploy several services. Just specify azuredeploy.json and to the task parameter:
- task: AzureResourceGroupDeployment@2
displayName: 'Several services deploy'
inputs:
azureSubscription: 'xxxxx'
resourceGroupName: 'xxxx'
location: 'xxxxxx'
csmFile: azuredeploy.json
csmParametersFile: azuredeploy.parameters.json
Upvotes: 2