Cloud & DevOps

What is Terraform?

Quick answer

A widely used infrastructure as code tool that lets teams define cloud resources in configuration files and create them automatically.

Terraform, explained

Terraform, created by HashiCorp and released in 2014, uses a declarative configuration language to describe resources such as servers, networks, databases, and DNS records. Running Terraform compares the configuration with what currently exists and makes the changes needed to match it. Providers let it work with all major cloud platforms and many other services.

For example, a team can define a complete staging environment in Terraform files, review changes in a pull request, and recreate the same setup in another region with a few commands. Terraform keeps track of resources in a state file, which must be stored securely and shared carefully. In 2023 HashiCorp changed Terraform's licence, which led to a community fork called OpenTofu that remains open source.

Related terms

Guides that mention Terraform