Overview of IaC solutions for Azure — compare ARM Templates, Bicep, and Terraform / OpenTofu side by side.
Why Infrastructure as Code?
- Repeatability — deploy identical environments across dev, staging, and production.
- Version control — track every infrastructure change alongside your application code.
- Automation — integrate deployments into CI/CD pipelines.
- Documentation — the config files are the living documentation.
- Drift detection — know when actual state diverges from desired state.
The Three Options at a Glance
| ARM Templates | Bicep | Terraform / OpenTofu | |
|---|---|---|---|
| Language | JSON | Bicep DSL | HCL |
| Maintained by | Microsoft | Microsoft | HashiCorp / OpenTofu |
| Scope | Azure only | Azure only | Multi-cloud |
| State file | No (Azure tracks state) | No (Azure tracks state) | Yes — local or remote .tfstate |
| Day-0 coverage | Full | Full | Provider lag possible |
| Plan preview | --what-if | --what-if | terraform plan |
| Learning curve | Steep | Moderate | Moderate |
| IDE support | Good | Excellent | Excellent |
Choosing the Right Tool
- Azure-only shop, want the best native experience? → Bicep
- Already using Terraform across multiple clouds? → Terraform / OpenTofu
- Need raw API access or maintaining existing pipelines? → ARM Templates
- Migrating from ARM to something more readable? → Bicep is a natural step — Bicep compiles directly to ARM.