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

Infrastructure as code

Define infrastructure as code to increase operator productivity and transparency.

Collaborate & share

Terraform configuration 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).

Reproducible infrastructure

Terraform lets operators easily use the same configurations in multiple places to reduce mistakes and save time.

Environment parity

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

Composing Resources

Use attributes from other resources to create an infrastructure composed of resources across multiple providers.

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. Collaborate on Terraform configurations, validate changes, and automate provisioning across providers.

Learn More