mirror of
https://github.com/farcasclaudiu/terraform-course.git
synced 2026-06-29 03:02:04 +03:00
demo-16
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
resource "aws_elb" "my-elb" {
|
||||
name = "my-elb"
|
||||
subnets = ["${aws_subnet.main-public-1.id}", "${aws_subnet.main-public-2.id}"]
|
||||
security_groups = ["${aws_security_group.elb-securitygroup.id}"]
|
||||
listener {
|
||||
instance_port = 80
|
||||
instance_protocol = "http"
|
||||
lb_port = 80
|
||||
lb_protocol = "http"
|
||||
}
|
||||
health_check {
|
||||
healthy_threshold = 2
|
||||
unhealthy_threshold = 2
|
||||
timeout = 3
|
||||
target = "HTTP:80/"
|
||||
interval = 30
|
||||
}
|
||||
|
||||
cross_zone_load_balancing = true
|
||||
connection_draining = true
|
||||
connection_draining_timeout = 400
|
||||
tags {
|
||||
Name = "my-elb"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user