Terraform Features
Core Features
Terraform provides declarative infrastructure provisioning using HCL (HashiCorp Configuration Language). Its core features include resource graph computation, dependency resolution, and the plan/apply workflow that gives operators confidence before making changes. Terraform supports over 2,000 providers covering major cloud platforms, SaaS services, and on-premises infrastructure.
State Management
Terraform maintains a state file that maps real-world resources to your configuration. State can be stored locally or remotely using backends like S3, Terraform Cloud, or Consul. State locking prevents concurrent modifications, and state files can be shared across teams for collaboration.
Module System
Terraform Modules allow you to encapsulate and reuse infrastructure configurations. The Terraform Registry hosts thousands of community and official modules for common patterns like VPCs, Kubernetes clusters, and database deployments. Modules support versioning, inputs, and outputs.
Workspaces
Terraform Workspaces enable managing multiple environments (dev, staging, production) with the same configuration. Each workspace maintains its own state file, allowing isolated infrastructure changes across environments.
Provisioners and Provisioning
Terraform includes provisioners for executing scripts, transferring files, and running configuration management tools on resources after creation. While provisioners should be used sparingly, they provide essential bootstrapping capabilities.