Skip to content

Instantly share code, notes, and snippets.

@carlosescura
Created June 3, 2019 14:08
Show Gist options
  • Save carlosescura/824a50ab29e9fd0ae9cb681d53d30d75 to your computer and use it in GitHub Desktop.
Save carlosescura/824a50ab29e9fd0ae9cb681d53d30d75 to your computer and use it in GitHub Desktop.
resource "aws_elb" "redash_service_elb" {
name = "redash-service-lb"
subnets = ["${var.loadbalancer_subnets}"]
security_groups = ["${aws_security_group.redash_service_loadbalancer_sg.id}"]
instances = ["${aws_instance.redash_service_ec2.id}"]
listener {
instance_port = 80
instance_protocol = "http"
lb_port = 443
lb_protocol = "https"
ssl_certificate_id = "${aws_acm_certificate.ssl_cert.arn}"
}
health_check {
healthy_threshold = 2
unhealthy_threshold = 3
timeout = 5
target = "TCP:80"
interval = 30
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment