Azure ARM Templates

620 views Asked by At

I have created 5 x ARM templates that combined deploys my application. Currently I have separate Templates/parameter files for the various assets (1 x servicebus, 1 x sql server, 1 x eventhub, etc)

Is this OK or should I merge them into 1 x template, 1 x parameter file that deploys everything?

Pro & cons? What is best practice here?

2

There are 2 answers

1
Dorin On BEST ANSWER

You should approach this from the deployment view.

First answer yourself few question:

  1. How separate resources such as ASB, SqlServer, Event hub are impacting your app? can your app run independently while all above are unavailable?
  2. How often do you plan to deploy? I assume you are going to implement some sort of Continuous deployment.
  3. How often will you provision a new environment.

so long story short. Anything that will have minimum (0) downtime on your app during deployment/disaster recovery, should be considered along with the fact anyone from the street can take you scripts and have your app running in reasonable time, say 30 min max.

0
Newton Sheikh On

Its always advised to have seperate JSON File for azuredeploy.json and azuredeploy.parameters.json.

Reason: Azuredeploy is the json file which actually holds your resouces and paramaters.json holds your paramaters. You can have one azuredeploy.json file and have multiple paramaters.json files. Like for example let say you different environements, Dev/Test/Prod, then you have seperate azuredeploy-Dev.paramaters.json, azuredeploy-Test.paramaters.json and so and so forth; you get the idea.

You can either merger seperate json files, one for service bus, one for VMs, etc. this will help when you want multiple people to work on seperate sections of your Resource group. Else you can merge them together.

BottomLine: You are the architect, do it as you want, whichever makes your life easy.