-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathElb.tf
41 lines (35 loc) · 832 Bytes
/
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
31
32
33
34
35
36
37
38
39
40
41
######
# ELB
######
# Use the AWS Elastic Load Balancer module
module "elb" {
source = "terraform-aws-modules/elb/aws"
name = "elb-styria"
# Associate the ELB with the same security group
subnets = ["${module.vpc.public_subnets}"]
security_groups = ["${aws_security_group.mnist_allow_http.id}"]
internal = false
# Place a listener on port 8080
listener = [
{
instance_port = "8080"
instance_protocol = "HTTP"
lb_port = "8080"
lb_protocol = "HTTP"
},
]
# Check every 30s
health_check = [
{
target = "HTTP:80/"
interval = 30
healthy_threshold = 2
unhealthy_threshold = 2
timeout = 5
},
]
tags = {
Owner = "user"
Environment = "Production"
}
}