- Terraform or CloudFormation?
Terraform is multi-cloud; CloudFormation is AWS-only. Terraform's workflow (plan/apply) is more uniform across clouds; CloudFormation integrates more deeply with AWS-specific features. For teams that only use AWS and want maximum native integration, CloudFormation is a reasonable choice. For teams that manage resources on multiple providers, Terraform (or OpenTofu) is the standard.
- Terraform or Ansible?
They solve different problems. Terraform is declarative provisioning: "create this VPC, this database, this load balancer". Ansible is procedural configuration: "install these packages, edit these files, restart these services". Most mature teams use both — Terraform for cloud infrastructure, Ansible for host configuration. Pulumi and CloudFormation occupy the Terraform role.
- What is the state file and why does it matter?
The state file maps resources declared in configuration to real resource IDs in the cloud. Without it, Terraform cannot know what it manages, so it cannot plan safely. Losing the state file means every resource has to be manually re-imported. The standard practice is a remote backend with locking and versioning (S3 + DynamoDB, GCS, Terraform Cloud).
- What happens if HashiCorp changes Terraform's license?
In 2023, HashiCorp changed the license to BUSL 1.1, restricting commercial use. The OpenTofu fork was created in response and adopted by the Linux Foundation. For most teams, OpenTofu is compatible with Terraform's syntax and providers; for teams that rely on newer Terraform features or HashiCorp's Terraform Cloud, Terraform remains the choice. The license change created a strategic decision point that every Terraform adopter should consciously make.
- How do I stop Terraform from destroying something by accident?
Three mechanisms: (1) never apply without reviewing the plan, (2) use
prevent_destroy = trueon resources that must never be deleted, (3) split configuration into layers so that a change to one layer cannot cascade to another. In automated pipelines, require a human approval for any plan that shows a destroy or replace operation.