github.com/turtlemonvh/terraform@v0.6.9-0.20151204001754-8e40b6b855e8/config/test-fixtures/basic.tf (about) 1 variable "foo" { 2 default = "bar" 3 description = "bar" 4 } 5 6 provider "aws" { 7 access_key = "foo" 8 secret_key = "bar" 9 } 10 11 provider "do" { 12 api_key = "${var.foo}" 13 } 14 15 resource "aws_security_group" "firewall" { 16 count = 5 17 } 18 19 resource aws_instance "web" { 20 ami = "${var.foo}" 21 security_groups = [ 22 "foo", 23 "${aws_security_group.firewall.foo}" 24 ] 25 26 network_interface { 27 device_index = 0 28 description = "Main network interface" 29 } 30 31 provisioner "file" { 32 source = "foo" 33 destination = "bar" 34 } 35 } 36 37 resource "aws_instance" "db" { 38 security_groups = "${aws_security_group.firewall.*.id}" 39 VPC = "foo" 40 41 depends_on = ["aws_instance.web"] 42 43 provisioner "file" { 44 source = "foo" 45 destination = "bar" 46 } 47 } 48 49 output "web_ip" { 50 value = "${aws_instance.web.private_ip}" 51 } 52 53 atlas { 54 name = "mitchellh/foo" 55 }