Devii · Cloud · 2026-03-09 · 8 min read
Terraform: Declarative Infrastructure And Remote State Discipline
HashiCorp Configuration Language, plan/apply workflow, and why state backends matter for teams.
**Terraform** describes infrastructure in **HCL** files. `terraform plan` shows diffs; `terraform apply` reconciles real resources with configuration. Providers map to AWS, Azure, GCP, Kubernetes, and hundreds of APIs.
**State** tracks resource IDs and dependencies. Remote backends (S3 + DynamoDB lock, Terraform Cloud, GCS) coordinate teams with locking to prevent concurrent corrupt applies.
Modules encapsulate reusable patterns. Pin provider versions. Use workspaces or separate state files to isolate environments.
Terraform manages lifecycle, not application deployment by itself. Pair with CI that runs `fmt`, `validate`, and policy checks (OPA, Sentinel, native cloud policy). Docs: `developer.hashicorp.com/terraform`.