Terraform is an infrastructure as code tool created by HashiCorp. You describe the resources you want in declarative configuration files written in HCL, and Terraform plans and applies the changes needed to make real infrastructure match them, using provider plugins for AWS, Azure, Google Cloud, Cloudflare and many other services.
Why it matters
Terraform gives teams a repeatable, reviewable way to build infrastructure across several providers with one workflow. The plan step previews what will be created, changed or destroyed before anything happens. Its state file records which real resources map to which configuration, which is how it knows what to update next time.
Example
terraform init
terraform plan
terraform apply
A plan might report Plan: 2 to add, 1 to change, 1 to destroy. Reading the destroy count carefully before approving is a core habit.
Common mistakes
- Keeping state only on one laptop. Use a shared remote backend with locking so two people cannot apply at once.
- Storing secrets in plain text in state or code; state can contain sensitive values.
- Running apply without reading the plan.
- Editing resources manually and then being surprised when the next apply reverts them.
- Not pinning provider versions, so an upgrade changes behavior unexpectedly.
Related
Get notified when this term updates
Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.
This page is general information written by our editorial team and updated when documentation changes. Servers and providers differ, so test changes safely first. See our editorial policy and disclaimer.