explaingit

hashicorp/terraform

Analysis updated 2026-06-20

48,337GoAudience · ops devopsComplexity · 4/5LicenseSetup · moderate

TLDR

A tool for defining cloud infrastructure in text files and automatically creating or updating it, so you manage AWS, Azure, or Google Cloud resources the same way you manage code.

Mindmap

mindmap
  root((Terraform))
    What it does
      Define infra as code
      Preview before applying
      Manage cloud resources
    How it works
      HCL config files
      Dependency graph
      Provider plugins
    Supported clouds
      AWS Azure GCP
      Many other providers
    Key concepts
      Execution plan
      State file
      Modules
    Audience
      DevOps engineers
      Platform teams
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Define your entire AWS infrastructure in version-controlled text files and deploy it reproducibly with one command.

USE CASE 2

Keep staging and production environments in sync by applying the same Terraform configuration to both with different variable values.

USE CASE 3

Preview exactly what resources will be created or deleted before applying any changes, reducing the risk of accidental destruction.

USE CASE 4

Automate provisioning of new cloud services so new environments can be spun up in minutes rather than hours of manual clicking.

What is it built with?

GoHCL

How does it compare?

hashicorp/terraformgogs/gogsalistgo/alist
Stars48,33747,49049,434
LanguageGoGoGo
Setup difficultymoderatemoderateeasy
Complexity4/53/53/5
Audienceops devopsops devopsops devops

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires cloud provider credentials and familiarity with your target cloud's resource model before you can do anything meaningful.

Free to use for most purposes, but using it as part of a competing hosted service requires a commercial license from HashiCorp after a transition period defined in the Business Source License.

In plain English

Terraform is a tool for defining and managing cloud infrastructure by writing configuration files rather than clicking through web consoles or running scripts manually. The core idea, called infrastructure as code, means you describe what you want your servers, databases, networks, and other cloud resources to look like, and Terraform figures out how to create or update them to match that description. When you run Terraform, it first generates an execution plan that shows you exactly what it intends to create, change, or destroy before anything actually happens. You review that plan, then apply it with confidence. Terraform also builds an internal graph of all your resources and their dependencies, which lets it create independent resources in parallel for speed, and ensures it always applies changes in the correct order. This approach solves a very real problem: manually managing cloud infrastructure (on AWS, Azure, Google Cloud, or dozens of other providers) is error-prone and hard to track. With Terraform, your entire infrastructure is described in text files that can be stored in version control, reviewed in pull requests, and rolled back if something goes wrong, the same workflow developers use for application code. You would use Terraform when setting up cloud environments, automating the provisioning of new services, keeping multiple environments (staging and production) consistent, or collaborating on infrastructure changes with a team. The tool is written in Go and uses a declarative configuration language called HCL (HashiCorp Configuration Language). It connects to cloud providers and services via plugins called providers, which are downloaded automatically from the public Terraform Registry. The project is source-available under the Business Source License.

Copy-paste prompts

Prompt 1
Write a Terraform configuration that creates an AWS EC2 instance running Ubuntu, a security group allowing SSH and HTTP traffic, and outputs the instance's public IP address.
Prompt 2
I want to manage staging and production AWS environments with the same Terraform code but different instance sizes and names. Show me how to use workspaces or modules to achieve this.
Prompt 3
Walk me through the Terraform workflow step by step: what happens when I run terraform init, terraform plan, and terraform apply on a new project for the first time?
Prompt 4
Write a Terraform module that creates an S3 bucket with versioning enabled, a lifecycle rule to move objects to Glacier after 90 days, and server-side encryption turned on.

Frequently asked questions

What is terraform?

A tool for defining cloud infrastructure in text files and automatically creating or updating it, so you manage AWS, Azure, or Google Cloud resources the same way you manage code.

What language is terraform written in?

Mainly Go. The stack also includes Go, HCL.

What license does terraform use?

Free to use for most purposes, but using it as part of a competing hosted service requires a commercial license from HashiCorp after a transition period defined in the Business Source License.

How hard is terraform to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is terraform for?

Mainly ops devops.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub hashicorp on gitmyhub

Verify against the repo before relying on details.