2014-07-28 19:43:00 +02:00
|
|
|
{
|
|
|
|
"variable": {
|
|
|
|
"foo": {
|
|
|
|
"default": "bar",
|
|
|
|
"description": "bar"
|
2016-01-21 20:33:16 +01:00
|
|
|
},
|
|
|
|
"bar": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"baz": {
|
|
|
|
"type": "map",
|
|
|
|
"default": {
|
|
|
|
"key": "value"
|
|
|
|
}
|
2014-07-28 19:43:00 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
"provider": {
|
|
|
|
"aws": {
|
|
|
|
"access_key": "foo",
|
|
|
|
"secret_key": "bar"
|
|
|
|
},
|
|
|
|
|
|
|
|
"do": {
|
|
|
|
"api_key": "${var.foo}"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2016-01-17 01:20:00 +01:00
|
|
|
"data": {
|
|
|
|
"do": {
|
|
|
|
"simple": {
|
|
|
|
"foo": "baz"
|
|
|
|
},
|
|
|
|
"depends": {
|
|
|
|
"depends_on": ["data.do.simple"]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2014-07-28 19:43:00 +02:00
|
|
|
"resource": {
|
|
|
|
"aws_instance": {
|
|
|
|
"db": {
|
|
|
|
"security_groups": ["${aws_security_group.firewall.*.id}"],
|
|
|
|
"VPC": "foo",
|
2015-01-16 19:14:48 +01:00
|
|
|
"depends_on": ["aws_instance.web"],
|
|
|
|
|
|
|
|
"provisioner": [{
|
|
|
|
"file": {
|
|
|
|
"source": "foo",
|
|
|
|
"destination": "bar"
|
|
|
|
}
|
|
|
|
}]
|
2014-07-28 19:43:00 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
"web": {
|
|
|
|
"ami": "${var.foo}",
|
|
|
|
"security_groups": [
|
|
|
|
"foo",
|
|
|
|
"${aws_security_group.firewall.foo}"
|
|
|
|
],
|
|
|
|
"network_interface": {
|
|
|
|
"device_index": 0,
|
|
|
|
"description": "Main network interface"
|
2015-01-16 19:14:48 +01:00
|
|
|
},
|
|
|
|
|
|
|
|
"provisioner": {
|
|
|
|
"file": {
|
|
|
|
"source": "foo",
|
|
|
|
"destination": "bar"
|
|
|
|
}
|
2014-07-28 19:43:00 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
"aws_security_group": {
|
|
|
|
"firewall": {
|
|
|
|
"count": 5
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
"output": {
|
|
|
|
"web_ip": {
|
|
|
|
"value": "${aws_instance.web.private_ip}"
|
|
|
|
}
|
2015-03-05 21:56:31 +01:00
|
|
|
},
|
|
|
|
|
|
|
|
"atlas": {
|
|
|
|
"name": "mitchellh/foo"
|
2014-07-28 19:43:00 +02:00
|
|
|
}
|
|
|
|
}
|