ENES

Terraform

A popular tool for describing cloud infrastructure in files and creating it for you.

A .tf file goes through plan, which lists the changes, and apply, which creates resources in AWS, Azure and Google Cloud, with a state file keeping track

Terraform is a tool for infrastructure as code, created by HashiCorp (now part of IBM) and released in 2014. You write files ending in .tf that say what you want, for example "a server of this size, a bucket with this name, a database in this network", and Terraform talks to the cloud to make it real.

The everyday loop has two commands. terraform plan compares your files with what exists and shows a list of changes it would make: create this, modify that, delete this other thing. terraform apply carries them out. To know what already exists, Terraform keeps a state file, a record of every resource it manages; teams store it in a shared place so two people do not change the same thing at once.

Its big draw is that one language works for many platforms. Plugins called providers connect it to AWS, Azure, Google Cloud, and hundreds of other services, from DNS to monitoring tools. In 2023 HashiCorp changed Terraform's license to one that is no longer open source, and part of the community forked it into OpenTofu, which works almost the same way.

Keep in mind

Go deeper

Related terms

More in Cloud