Skip to content

Instantly share code, notes, and snippets.

@krotkiewicz
Created July 25, 2017 06:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save krotkiewicz/edcc20d0aa1755b4f4673ca8218e1981 to your computer and use it in GitHub Desktop.
Save krotkiewicz/edcc20d0aa1755b4f4673ca8218e1981 to your computer and use it in GitHub Desktop.
resource "aws_elb" "elb" {
name = "rabbit-elb"
listener {
instance_port = 5672
instance_protocol = "tcp"
lb_port = 5672
lb_protocol = "tcp"
}
listener {
instance_port = 15672
instance_protocol = "http"
lb_port = 80
lb_protocol = "http"
}
health_check {
interval = 30
unhealthy_threshold = 10
healthy_threshold = 2
timeout = 3
target = "TCP:5672"
}
subnets = ["${var.subnet_ids}"]
idle_timeout = 3600
internal = true
security_groups = ["${aws_security_group.rabbitmq_elb.id}"]
tags {
Name = "rabbitmq"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment