T
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
- Install the Terraform CLI on your machine.
- Create a
main.tffile and define your provider (e.g., AWS). - Run
terraform initto download the provider plugins. - Run
terraform planto see the proposed infrastructure changes. - Run
terraform applyto deploy the resources.
Important Notes
- State File: Terraform stores the state of your infrastructure in a
terraform.tfstatefile. 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
planbefore applying.