Overview
HashiCorp Terraform is an infrastructure as code (IaC) tool designed to help developers and operations teams provision and manage cloud infrastructure. It allows users to define infrastructure resources, such as virtual machines, networks, and databases, in a configuration file using HashiCorp Configuration Language (HCL). This declarative approach enables users to specify the desired state of their infrastructure, and Terraform then computes and executes the necessary actions to achieve that state Terraform's introduction to IaC principles.
The platform supports a broad ecosystem of providers, including major public clouds like AWS, Azure, and Google Cloud, as well as private clouds and SaaS offerings. This multi-cloud capability is a core strength, enabling organizations to manage their infrastructure consistently across different environments from a single codebase. Terraform manages the lifecycle of resources, from initial provisioning to updates and eventual destruction, by maintaining a state file that maps real-world resources to the configuration Terraform state management documentation.
Terraform's utility extends beyond simple provisioning. It facilitates workflow automation, allowing teams to integrate infrastructure changes into continuous integration and continuous delivery (CI/CD) pipelines. This promotes reproducible infrastructure, reduces manual errors, and improves operational efficiency. The tool also supports modularity, allowing users to encapsulate and reuse configurations, which is beneficial for managing complex infrastructure architectures and promoting standardization across teams.
For larger organizations, Terraform offers commercial versions, Terraform Cloud and Terraform Enterprise, which provide additional features such as remote state management, team collaboration, policy enforcement (policy as code), and a private registry for modules HashiCorp Terraform product tiers. These extended capabilities address the governance, security, and scalability requirements crucial for enterprise-grade infrastructure management.
Key features
- Declarative Configuration Language (HCL): Defines infrastructure using a human-readable and machine-interpretable language, specifying the desired state rather than a sequence of commands HCL language syntax guide.
- Multi-Cloud and Multi-Provider Support: Provisions and manages resources across a wide range of cloud providers (e.g., AWS, Azure, GCP), on-premises solutions, and SaaS platforms using a unified workflow.
- Infrastructure State Management: Maintains a state file to track the real-world resources managed by Terraform, enabling it to determine necessary changes during subsequent runs Terraform's state file mechanics.
- Execution Plans: Generates a detailed plan of changes Terraform will make to achieve the desired state before any modifications are applied, allowing for review and approval Terraform plan command details.
- Module Reusability: Supports the creation and use of reusable modules to encapsulate common infrastructure configurations, promoting standardization and reducing duplication.
- Policy as Code (Sentinel): Enforces governance and compliance policies on infrastructure deployments through integration with HashiCorp Sentinel, preventing unapproved changes (available in Terraform Cloud/Enterprise) Sentinel policy enforcement in Terraform Cloud.
- Remote Operations and Collaboration: Terraform Cloud and Enterprise provide features for remote execution, version control integration, and team collaboration, streamlining IaC workflows for distributed teams.
- Secret Management Integration: Integrates with secret management tools like HashiCorp Vault to securely inject sensitive data into configurations Terraform Vault provider documentation.
Pricing
HashiCorp Terraform offers a free tier and several paid tiers for its Terraform Cloud service, with custom pricing available for enterprise needs. Pricing is current as of May 7, 2026.
| Tier | Details | Key Features |
|---|---|---|
| Terraform Cloud Free | Free, up to 500 managed resources. | VCS-driven workflow, remote state & operations, private module registry, CLI-driven workflow, up to 5 users. |
| Terraform Cloud Standard | Starts at $0.00014/resource-hour, billed monthly. | All Free features, OPA-based policy as code, cost estimation, team & governance features, unlimited users & resources. |
| Terraform Cloud Premium | Custom enterprise pricing. | All Standard features, advanced policy as code (Sentinel), self-hosted agents, audit logs, service level agreements (SLAs). |
| Terraform Enterprise | Custom enterprise pricing. | Self-hosted version of Terraform Cloud Premium, designed for environments with strict compliance and security requirements. |
For detailed and up-to-date pricing information, refer to the official HashiCorp Terraform pricing page.
Common integrations
- AWS: Provisions and manages Amazon Web Services resources including EC2, S3, RDS, VPC, and more Terraform AWS Provider documentation.
- Azure: Manages Microsoft Azure resources like Virtual Machines, Azure SQL Database, Azure Virtual Networks, and App Services Terraform Azure Provider documentation.
- Google Cloud Platform (GCP): Automates the deployment and management of GCP services such as Google Compute Engine, Cloud Storage, and Google Kubernetes Engine Terraform Google Cloud Provider documentation.
- Kubernetes: Manages Kubernetes clusters and resources, including deployments, services, and ingress controllers Terraform Kubernetes Provider documentation.
- GitHub/GitLab: Integrates with version control systems for CI/CD workflows, triggering Terraform runs on code commits Terraform Cloud GitHub VCS integration.
- HashiCorp Vault: Retrieves and injects secrets into Terraform configurations securely during provisioning Terraform Vault provider documentation.
- Datadog/Splunk: Integrates with monitoring and logging platforms for observing infrastructure provisioned by Terraform Terraform Datadog provider details.
Alternatives
- Pulumi: An IaC tool that allows users to define infrastructure in general-purpose programming languages (e.g., Python, TypeScript, Go).
- AWS CloudFormation: Amazon's native IaC service for provisioning AWS resources, using JSON or YAML templates.
- Ansible: An open-source automation engine that automates software provisioning, configuration management, and application deployment, often used for server configuration.
Getting started
To get started with HashiCorp Terraform, you typically define your infrastructure in a .tf file using HCL. The following example provisions an AWS S3 bucket. Ensure you have the AWS provider configured with appropriate credentials before running.
# main.tf
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 5.0"
}
}
}
provider "aws" {
region = "us-east-1"
}
resource "aws_s3_bucket" "example_bucket" {
bucket = "my-unique-platformdex-example-bucket-2026"
acl = "private"
tags = {
Name = "PlatformdexExampleBucket"
Environment = "Development"
}
}
output "bucket_id" {
value = aws_s3_bucket.example_bucket.id
description = "The ID of the S3 bucket."
}
To apply this configuration:
- Save the code as
main.tfin an empty directory. - Run
terraform initto initialize the working directory and download the AWS provider. - Run
terraform planto see an execution plan of the changes Terraform proposes. - Run
terraform applyto execute the plan and create the S3 bucket. Typeyeswhen prompted to confirm. - Once complete, the S3 bucket will be created in your AWS account in the
us-east-1region. You can verify its existence via the AWS console. - To remove the resources, run
terraform destroy.