mirror of
https://github.com/farcasclaudiu/terraform-course.git
synced 2026-06-22 05:01:55 +03:00
5d9eeb6c4c
* Terraform 0.12
27 lines
653 B
Terraform
27 lines
653 B
Terraform
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"
|
|
}
|
|
}
|
|
|