Skip to content

Terraform

Terraform is an infrastructure provisioning tool that uses declarative configuration to create, update, and destroy resources across many providers.

Why Terraform

  • It is declarative rather than procedural.
  • It works with many providers from a single workflow.
  • It keeps infrastructure changes reviewable in version control.
  • It manages lifecycle and state explicitly.

Core Pages

Workflow

  1. Scope the infrastructure you need.
  2. Write the configuration in .tf files.
  3. Run terraform init to download providers.
  4. Run terraform plan to review changes.
  5. Run terraform apply to create or update resources.
  6. Use terraform destroy when the infrastructure is no longer needed.

Practical Notes

  • Keep state protected and backed up.
  • Prefer modules when the same pattern repeats.
  • Use variables, outputs, and data sources to keep configurations reusable.