2014-05-24 22:57:51 +02:00
|
|
|
variable "foo" {
|
|
|
|
default = "bar";
|
|
|
|
description = "bar";
|
|
|
|
}
|
|
|
|
|
2014-05-24 23:02:49 +02:00
|
|
|
resource "aws_security_group" "firewall" {}
|
2014-05-24 22:57:51 +02:00
|
|
|
|
2014-05-24 23:02:49 +02:00
|
|
|
resource "aws_instance" "web" {
|
2014-05-24 22:57:51 +02:00
|
|
|
ami = "${var.foo}"
|
|
|
|
security_groups = [
|
|
|
|
"foo",
|
|
|
|
"${aws_security_group.firewall.foo}"
|
|
|
|
]
|
|
|
|
}
|
2014-05-24 23:02:49 +02:00
|
|
|
|
|
|
|
resource "aws_load_balancer" "weblb" {
|
|
|
|
members = "${aws_instance.web.id_list}"
|
|
|
|
}
|