-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlb.tf
40 lines (33 loc) · 855 Bytes
/
lb.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
36
37
38
39
40
##############################################################
# ELB.
##############################################################
module "elb" {
source = "terraform-aws-modules/elb/aws"
depends_on = [module.security_group]
providers = {
aws = aws.us-east-1
}
name = "asg-load-balancer"
subnets = data.aws_subnet_ids.all.ids
security_groups = [module.security_group.this_security_group_id]
internal = false
listener = [
{
instance_port = "5000"
instance_protocol = "HTTP"
lb_port = "5000"
lb_protocol = "HTTP"
},
]
health_check = {
target = "HTTP:5000/"
interval = 30
healthy_threshold = 2
unhealthy_threshold = 2
timeout = 5
}
tags = {
Owner = "user"
Environment = "dev"
}
}