Terraform is an open source tool that allows you to codify APIs into declarative configuration files that can be shared amongst team members, treated as code, edited, reviewed, and versioned. Safely and predictably create, change, and improve production infrastructure.

Trusted in production by:

  • Nike
  • HBO
  • Capital One
  • Target
  • Hotels.com
  • Home Depot

Features

Write

Infrastructure as code

Plan

Workflows, not technologies

Create

Cloneable infrastructure

Infrastructure as code

Define infrastructure as code to increase operator productivity through collaboration and automation.

Collaborate & share

Terraform configuration and state can be stored in version control, shared, and collaborated on by teams of operators.

Evolve your infrastructure

Track the complete history of infrastructure versions.

Automation friendly

If it can be codified, it can be automated.

One safe workflow across providers

Terraform provides an elegant user experience for operators to safely and predictably make changes to infrastructure.

Map resource dependencies

Understand how a minor change could have potential cascading effects across an infrastructure before executing that change. Terraform builds a dependency graph from the configurations, and walks this graph to generate plans, refresh state, and more.

Separation of plan & apply

Separating plans and applies reduces mistakes and uncertainty at scale. Plans show operators what would happen, applies execute changes.

One workflow

Use Terraform to create resources across all major infrastructure providers (AWS, GCP, Azure, OpenStack, VMware, and more).

Cloneable infrastructure

Infrastructures share commonality across environments and organizations. Terraform lets operators easily use the same configurations in multiple places to save time.

Identical environments

Use the same Terraform configuration to provision identical staging, qa, and production environments.

Shareable modules

Common Terraform configurations can be packaged as modules and used across teams and organizations.

Combine multiple providers consistently

Terraform allows you to effortlessly combine high-level system providers. Launch a server from one cloud provider, add a DNS entry with its IP with a different provider. Built-in dependency resolution means things happen in the right order.

Examples

Layering Resources

Use attributes from other resources to create a layered infrastructure. Terraform handles ordering resource creation automatically.

Example Configuration

resource "digitalocean_droplet" "web" {

name = "tf-web"

size = "512mb"

image = "centos-5-8-x32"

region = "sfo1"

}

resource "dnsimple_record" "hello" {

domain = "example.com"

name = "test"

value = "${digitalocean_droplet.web.ipv4_address}"

type = "A"

}

Fast, Simplified Interaction

Simple and intuitive configuration makes even the most complicated services approachable: no more web consoles, loading bars, or confusing CLI clients.

Example Configuration

resource "aws_elb" "frontend" {

name = "frontend-load-balancer"

listener {

instance_port = 8000

instance_protocol = "http"

lb_port = 80

lb_protocol = "http"

}

instances = ["${aws_instance.app.*.id}"]

}

resource "aws_instance" "app" {

count = 5

ami = "ami-408c7f28"

instance_type = "t1.micro"

}

The intro contains a walkthrough guide, introductory literature and a range of examples to experiment with Terraform.

Get started

Latest: We’ve released Terraform 0.7!

Read more

Terraform Enterprise

Collaborative Infrastructure Automation for organizations and businesses. Collaborate on Terraform configurations, validate changes, and automate provisioning.

Checkout Terrform Enterprise