gitmyhub

terraform

Go ★ 49k updated 1d ago

Terraform enables you to safely and predictably create, change, and improve infrastructure. It is a source-available tool that codifies APIs into declarative configuration files that can be shared amongst team members, treated as code, edited, reviewed, and versioned.

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.

GoHCLsetup: moderatecomplexity 4/5

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.

Where it fits