Infrastructure as code

Terraform provides a common configuration to launch infrastructure — from physical and virtual servers to email and DNS providers. Once launched, Terraform safely and efficiently changes infrastructure as the configuration is evolved.

Simple file based configuration gives you a single view of your entire infrastructure.

$ terraform apply

Combine Multiple Providers

Terraform allows you to effortlessly combine high-level system providers with your own or with each other. 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.

Evolve your Infrastructure

Your configuration and state can be stored in version control, shared and distributed among your team. Updates, scaling and modifications will be planned first, so you can iterate with confidence.

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.