Here is a quick comparison of these Infrastructure as Code (IaC) tools:
| Terraform | Cloudformation | ARM Template | |
| Supported Cloud Providers | Terraform supports multiple cloud providers like AWS, Azure, Google Cloud Platform (GCP), and others. | AWS CloudFormation supports only AWS cloud infrastructure. | Azure ARM templates support only Azure cloud infrastructure. |
| Language | Terraform uses its own declarative language called HashiCorp Configuration Language (HCL) or HashiCorp Configuration Language version 2 (HCL2). | AWS CloudFormation uses JSON or YAML templates. | Azure ARM templates use JSON templates. |
| Resource Management | Terraform manages resources as individual objects, and it uses a graph-based approach to understand the dependencies between them. | AWS CloudFormation manages resources as stacks, which are collections of AWS resources that you can manage as a single unit. | Azure ARM templates manage resources as a deployment, which is a set of resources that are deployed and managed as a single unit. |
| Complexity | Terraform is more complex to learn and use compared to AWS CloudFormation and Azure ARM templates. However, it offers more flexibility and customization options. | AWS CloudFormation is easy to use and has a more streamlined interface. However, it has some limitations when it comes to customization. | Azure ARM templates are also easy to use, but they have some limitations when it comes to the available resources and customizability. |
| Cost | Terraform is free and open-source, but may users need to pay for the resources they provision using the tool. | AWS CloudFormation is also free, but may users need to pay for the resources they provision using the tool. | Azure ARM templates are also free, but users may need to pay for the resources they provision using the tool. |
In summary, each tool has its own strengths and weaknesses. Terraform is more flexible and supports multiple cloud providers, but it is more complex to use. AWS CloudFormation is easy to use and has a more streamlined interface, but it is limited to AWS cloud infrastructure. Azure ARM templates are also easy to use, but they have some limitations when it comes to customization and available resources. Ultimately, the choice between these tools depends on the specific requirements of your infrastructure and your team’s skills and preferences.
Personally I use Terraform as it has a common language which can be used to provision resources across platforms and is quickly becoming an industry standard.