Terraform Explained

The infrastructure-as-code tool that turns cloud provisioning into version-controlled, reviewable, automated code.

Terraform

Terraform is an open-source infrastructure-as-code tool by HashiCorp that lets teams define cloud infrastructure in declarative configuration files, enabling version-controlled, reproducible, and automated infrastructure provisioning.

Explanation

Manually clicking through cloud provider consoles to create servers, databases, and networks is error-prone and impossible to reproduce reliably. Terraform replaces this with code: you write HCL (HashiCorp Configuration Language) files that declare what resources you need, and Terraform creates, updates, or destroys them to match. Terraform works with virtually every cloud provider (AWS, GCP, Azure, DigitalOcean) and SaaS service (Cloudflare, Datadog, PagerDuty) through providers — plugins that translate Terraform configuration into API calls. The state file tracks what resources Terraform manages, enabling it to calculate the minimal set of changes needed for each update. The workflow is straightforward: terraform init (install providers), terraform plan (preview changes), terraform apply (execute changes). Plans show exactly what will be created, modified, or destroyed before any action is taken. Teams store Terraform code in version control, review infrastructure changes in pull requests, and apply changes through CI/CD pipelines — the same workflow used for application code.

Bookuvai Implementation

Bookuvai uses Terraform to provision all cloud infrastructure for client projects. Infrastructure is defined in version-controlled modules, reviewed in pull requests alongside application code, and applied through automated pipelines. Our reusable Terraform modules cover common patterns — VPCs, databases, Kubernetes clusters, CDNs — reducing setup time for new projects.

Key Facts

  • Supports 3,000+ providers covering all major cloud and SaaS platforms
  • State files track managed resources for incremental updates
  • terraform plan previews all changes before any action is taken
  • HCL is declarative — you specify what, not how
  • Modules enable reusable, composable infrastructure patterns

Related Terms

Frequently Asked Questions

How is Terraform different from CloudFormation?
CloudFormation is AWS-specific. Terraform is cloud-agnostic and works with AWS, GCP, Azure, and thousands of other providers. Terraform also has a more mature module ecosystem and a readable HCL syntax.
What is Terraform state?
Terraform state is a JSON file that maps your configuration to real-world resources. It enables Terraform to know what exists, what changed, and what needs updating. Remote state backends (S3, Terraform Cloud) enable team collaboration.
Can Terraform destroy infrastructure?
Yes. terraform destroy removes all resources managed by the configuration. terraform plan always shows what will be destroyed before execution, and lifecycle rules can prevent accidental deletion of critical resources.