.tf

What is a .tf file?

Terraform files define cloud infrastructure as code — create servers, databases, and networks by writing config files.

Safe format
Type Code
By HashiCorp
MIME text/x-terraform

Drop any file to identify it

No upload. No signup. No sending your file halfway across the internet.
We tell you what it is, right here in your browser.

What is it

Terraform turned infrastructure into code. Instead of clicking through AWS consoles to create servers, you write a .tf file that declares what you want: a VPC, three EC2 instances, a load balancer, a database. Run `terraform apply` and it creates everything. Run it again and it changes nothing (idempotent). Change the file and apply again — it figures out the diff and modifies only what changed.

The language is HCL (HashiCorp Configuration Language), a declarative format that reads like JSON without the punctuation. Resources have types (`aws_instance`, `google_cloud_run_service`), names, and attributes. Providers connect Terraform to cloud platforms — AWS, GCP, Azure, Cloudflare, and hundreds more.

Terraform state tracks what infrastructure exists, enabling it to plan changes before applying them. `terraform plan` shows exactly what will be created, modified, or destroyed — review before you accidentally delete production. The tool is essential for DevOps, platform engineering, and anyone managing cloud infrastructure at scale.

Technical details
Full Name
Terraform Configuration
MIME Type
text/x-terraform
Developer
HashiCorp
Magic Bytes
N/A
Safety
.tf is a known, safe format. Configuration file. Safe to read. Running `terraform apply` provisions real cloud resources (and costs money).
What opens it
VS Code (+ Terraform extension)
FREE Windows / Mac / Linux
Any text editor
FREE Windows / Mac / Linux
FAQ
What is Infrastructure as Code?
Instead of manually creating cloud resources through web consoles, you define them in code files (.tf). This makes infrastructure version-controlled, reviewable, repeatable, and automated.
Is Terraform free?
Terraform CLI is free and open-source. Terraform Cloud (team collaboration, state management) has a free tier for small teams. Enterprise features require paid plans.
Related formats