Azure Resource Manager (ARM) actually has a few ways to be consumed, including an API and json based templates. ARM templates are used heavily in lots of solutions to provision environments, but on reflection json it not a great way to define an environment, while it is perfect to store the state of the environment trying to add new resources can be painful, because of issues like the ones mentioned below.
Example of a resource reference
"[concat(listKeys((resourceId(concat(...,...,...))).Key1]"
As You can see from the example above within json templates you functions are heavily used, the issue with this is that as an individual who is trying to maintain the code base it can be painful, especially as these function calls are all nested inside a string.
For
- 1st party so latest nd greatest
- Represents the state of the environment
- Handles diffs, so great for re-runs
Against
- json isn't a great way to define large and complex environments
- Referencing resources is horrid
- Azure only
- Only goodish tooling requires full fat Visual Studio
While the Azure CLI is great for creating ad hoc resources, when it comes to a production environment where the environment is evolving with new apps coming in that have new requirements, it immeditatly makes it harder to manage. It doesn't track state of the environment, so if you had a create that created a resource group and you ran it twice it would fail. This means you would have to manage multiple smaller scripts and run them in order, which without additional process can lead to human error.
For
- 1st party so latest and greatest
- Great documentation
- Same commands for both bash and PowerShell
Against
- No state management
- No 3rd party resource support
Terraform is a product from Hashicorp, it is open source and free to use, they also have products to help enterprise organisations use the tooling, from a free Tier up to full hosted solutions which come at a price. It uses HCL to define an environment, this stands for Hashi Corp Langugage. The same syntax can be used to provision resources across all the big cloud providers and a huge range of other providers, while this is great it is key to keep in mind, using Terraform to provision a VM in Azure doesn't mean you can run the same file to get a VM in AWS or GCP, the providers for each platform, while using the same pattern and syntax are unique to themselves.
For
- Best syntax I have seen so far
- Maintainable
- Great patteren to reference resources
- Can work with existing Azure resources
- Great documentation and community
- Can provision Azure and non-Azure resources together
- State management for simplified re-runs and working as a Team
- Great extension for VSCode
Against
- 3rd party so not all resources available, meaning you still have to include some ARM