Published:
Last updated:
Terraform and OpenTofu
Terraform (and its open-source fork OpenTofu) are the industry standards for Infrastructure as Code. They allow cloud resources to be defined in a declarative language (HCL).
Core Concept
Write, Plan, Apply: resources are defined in text files. Terraform creates an execution plan and ensures that the actual state in the cloud (AWS, Azure, etc.) matches the code. The provider model enables control of virtually any cloud API.
Assessment
- Use case: Managing cloud infrastructure, Kubernetes clusters, and SaaS configurations.
- Advantage: Complete reproducibility of infrastructure, version control for ops, and support for multi-cloud scenarios.
- Limitation: Errors in code can have massive impact on live infrastructure (state management is critical).
- Licence: HashiCorp switched to the Business Source License (BSL) in 2023, restricting commercial use in competing products. OpenTofu (MPL-2.0, Linux Foundation) is the free community fork and drop-in replacement.