Terraform & Infrastructure as Code
Terraform lets you define cloud and on-prem infrastructure as declarative, version-controlled code, then create or change it safely with a plan/apply workflow. These guides cover providers and resources, state management, modules for reuse, and the discipline that keeps IaC maintainable: remote state with locking, plan reviews in pull requests, and avoiding drift.
The articles focus on real-world patterns — structuring modules, managing multiple environments, and handling secrets — rather than tool tours, so you can apply them to AWS, GCP, Azure, or hybrid setups.
Frequently asked questions
What is Terraform used for?
Terraform provisions and manages infrastructure (servers, networks, databases, DNS, and more) as code. You describe the desired state, and Terraform figures out the create/update/delete actions to reach it — making infrastructure reproducible, reviewable, and version-controlled.
What is Terraform state and why does it matter?
State is Terraform's record of the real infrastructure it manages, mapping your config to actual resources. It should be stored remotely (e.g., S3 with locking) so teams share one source of truth and avoid concurrent changes that corrupt it.
Is Terraform better than CloudFormation or Pulumi?
Terraform is cloud-agnostic and has the largest provider ecosystem, which suits multi-cloud and mixed environments. CloudFormation is AWS-native and deeply integrated; Pulumi lets you use general-purpose languages. The right choice depends on your cloud footprint and team's language preferences.