DevOps
Terraform
Infrastructure as Code: you declare cloud resources (servers, networks, databases) in HCL and Terraform plans and applies the diff to reach that state, tracked in a state file. It makes infrastructure versioned, reviewable and reproducible across environments. Guard the state file — it holds secrets — and beware drift from manual console changes.
Purpose
Terraform is Infrastructure as Code: you declare cloud resources — networks, servers, databases, DNS — in HCL files, and terraform plan/apply computes and executes the diff between what exists and what you declared. Infrastructure becomes versioned, reviewable and reproducible instead of hand-built and undocumented.
When to Use It
Standing up identical dev/staging/prod environments, codifying an entire cloud account so it can be rebuilt, and reviewing infrastructure changes in pull requests like any other code. Its provider ecosystem covers all major clouds and most SaaS.
Trade-offs
The state file is both the mechanism and the liability: it must be stored remotely, locked against concurrent runs, and protected — it can contain secrets. Manual console changes cause drift that the next plan will surface (or clobber). HCL modules also grow their own complexity at scale.
Implementation
Keep state in a remote backend with locking; structure code into modules and separate state per environment. The golden rule: after adopting Terraform, all changes go through it — no console edits. Review every plan before apply, and run it from CI so changes are consistent and audited.