Terraform

Package

Infrastructure as code tool that provisions cloud resources from HCL files

Price
Free CLI; HCP free tier, then paid
Access
Cloud credentials; HCP Terraform token

About

HashiCorp Terraform, now owned by IBM, plans and applies infrastructure changes described in HCL files, through providers for clouds and SaaS APIs. The CLI is source-available under BUSL-1.1; HCP Terraform adds remote runs, state storage and policy checks.

What you can do with it

  • Provision AWS, Azure or Google Cloud resources from versioned config files
  • Preview every change with terraform plan before you apply it
  • Run plans remotely and keep state in HCP Terraform

Get started

  1. Install the Terraform CLI
  2. Save the configuration below as main.tf
  3. Run terraform init, then terraform apply

Example

# main.tf: runs an nginx container with the Docker provider
terraform {
  required_providers {
    docker = { source = "kreuzwerker/docker", version = "~> 4.2.0" }
  }
}
resource "docker_image" "nginx" { name = "nginx:latest" }
resource "docker_container" "nginx" {
  image = docker_image.nginx.image_id
  name  = "tutorial"
  ports { internal = 80 }
}

Details

Hosting
Hosted service, Self-hosted, Runs locally
Available in
Worldwide
Official SDKs
Go, Python
MCP server
Local
Works with
AWS, Azure, Google Cloud

Tasks

Alternatives

Other tools for the same tasks.

Last checked on .