Terraform

Infrastructure as code for any cloud.

developer Developer Tools 💰 freemium 👁️ 0
🌐 Visit Website

About

Overview

Terraform is an open-source infrastructure-as-code (IaC) software tool by HashiCorp. It allows you to define both cloud and on-prem resources in human-readable configuration files that you can version, reuse, and share (e.g., provisioning AWS EC2 servers or Cloudflare DNS records).

Pricing & Free Tier

Free Tier: Yes. The Terraform CLI is open-source and free for all users.
Terraform Cloud: Free up to 500 managed resources. Paid plans start at $20/user/month.
Note: HashiCorp changed the license to BSL in 2023, leading to the creation of the OpenTofu open-source fork.

How to Use

  1. Install the Terraform CLI on your machine.
  2. Create a main.tf file and define your provider (e.g., AWS).
  3. Run terraform init to download the provider plugins.
  4. Run terraform plan to see the proposed infrastructure changes.
  5. Run terraform apply to deploy the resources.

Important Notes

  • State File: Terraform stores the state of your infrastructure in a terraform.tfstate file. Never commit this to public Git; use a remote backend like S3.
  • Destructive Actions: If you remove a resource from the config file, Terraform will destroy the actual infrastructure. Always review the plan before applying.