-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathaws_elb.tf
30 lines (30 loc) · 1.26 KB
/
aws_elb.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
resource "aws_elb" "aws_elb" {
name = var.aws_elb_name
subnets = module.vpc.public_subnets
security_groups = [aws_security_group.aws_sg.id]
listener {
instance_port = var.aws_elb_listener_instance_port
instance_protocol = var.aws_elb_listener_instance_protocol
lb_port = var.aws_elb_listener_lb_port
lb_protocol = var.aws_elb_listener_lb_protocol
}
health_check {
healthy_threshold = var.aws_elb_health_check_healthy_threshold
unhealthy_threshold = var.aws_elb_health_check_unhealthy_threshold
timeout = var.aws_elb_health_check_timeout
target = var.aws_elb_health_check_target
interval = var.aws_elb_health_check_interval
}
cross_zone_load_balancing = var.aws_elb_cross_zone_load_balancing
idle_timeout = var.aws_elb_idle_timeout
connection_draining = var.aws_elb_connection_draining
connection_draining_timeout = var.aws_elb_connection_draining_timeout
tags = var.aws_tags
}
resource "aws_lb_target_group" "aws_lb_tg" {
name = var.aws_lb_target_group_name
port = var.aws_lb_target_group_port
protocol = var.aws_lb_target_group_protocol
vpc_id = module.vpc.vpc
tags = var.aws_tags
}