forked from terraform-aws-modules/terraform-aws-elb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
35 lines (27 loc) · 902 Bytes
/
main.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
######
# ELB
######
module "elb" {
source = "./modules/elb"
name = "${var.name}"
subnets = ["${var.subnets}"]
security_groups = ["${var.security_groups}"]
internal = "${var.internal}"
cross_zone_load_balancing = "${var.cross_zone_load_balancing}"
idle_timeout = "${var.idle_timeout}"
connection_draining = "${var.connection_draining}"
connection_draining_timeout = "${var.connection_draining_timeout}"
listener = ["${var.listener}"]
access_logs = ["${var.access_logs}"]
health_check = ["${var.health_check}"]
tags = "${merge(var.tags, map("Name", format("%s", var.name)))}"
}
#################
# ELB attachment
#################
module "elb_attachment" {
source = "./modules/elb_attachment"
number_of_instances = "${var.number_of_instances}"
elb = "${module.elb.this_elb_id}"
instances = "${var.instances}"
}