Graph
Terraform

🏗️Terraform

NEW

Infrastructure as code tool to provision and manage resources declaratively across many providers.

DESCRIPTION

Terraform uses the HashiCorp Configuration Language (HCL) to define desired infrastructure state. It plans changes and applies them safely, maintaining state for drift detection and dependency management. Providers and modules enable multi-cloud reuse and composability. Terraform integrates with CI/CD and GitOps workflows for automated, auditable infrastructure delivery. The community maintains extensive providers and modules, with OpenTofu as an open fork for those preferring a fully open-source license.

ALTERNATIVE DEFINITIONS

HashiCorp

Terraform is an infrastructure as code tool that lets you define both cloud and on‑prem resources in human-readable configuration files that you can version, reuse, and share.

Emphasizes human-readable IaC and reuse across environments.

Source

Wikipedia

Terraform is an infrastructure as code software tool created by HashiCorp that enables users to define and provision data center infrastructure.

Highlights origin and IaC provisioning capability.

Source

Infrastructure as Code HCL Sub-Model State File Kubernetes GitOps Idempotency

COMPETING TERMS

Pulumi AWS CloudFormation OpenTofu

KNOWLEDGE AREAS

Infrastructure Cloud Platform & Tooling Software Engineering

TARGET AUDIENCE

DevOps Engineer Cloud Architect Software Developer IT Manager Solution Architect Security Architect

EXTERNAL SOURCES

TOP QUESTIONS

What problems does Terraform solve?

It standardizes provisioning by codifying infrastructure, enabling repeatable, versioned, and automated deployments across multiple clouds and platforms.

Category: Overview

How does Terraform differ from CloudFormation?

Terraform is multi-cloud with HCL and a provider ecosystem, while CloudFormation is AWS-native with deep AWS integration but limited outside AWS.

Category: Comparison

What are Terraform modules?

Reusable building blocks encapsulating resources and variables for composition, promoting DRY patterns and standardization.

Category: Concepts

How do I manage Terraform state securely?

Use remote backends (e.g., S3 with DynamoDB locks), encryption at rest, and restricted access policies.

Category: Best practices

What are common mistakes with Terraform?

Committing state to Git, skipping plan review, hardcoding secrets, and neglecting lifecycle dependencies are frequent pitfalls.

Category: Mistakes

How does Terraform fit into GitOps?

Treat infrastructure definitions as code reviewed via PRs, with automated plans and applies in CI/CD after approvals.

Category: How-to

What is OpenTofu in relation to Terraform?

OpenTofu is a community-driven open-source fork offering compatibility for users preferring an open license alternative.

Category: Alternatives

How does Terraform handle changes safely?

The plan phase previews diffs; apply executes them with resource graph ordering and error handling to reduce risk.

Category: Capabilities

How can I reduce Terraform drift?

Use remote state, avoid manual changes, implement policy-as-code, and run periodic plan checks to detect drift.

Category: Best practices