Skip to content

updated to allow access to other protocols e.g. tcp #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions elb_http/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ Input Variables
the ELB have an internal IP
- `subnet_az1` - The VPC subnet ID for AZ1
- `subnet_az2` - The VPC subnet ID for AZ2
- `backend_port` - The port the service running on the EC2 insances
- `(frontend_port | backend_port)` - The port the service running on/off the EC2 insances
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

List all variables explicitly (one after another on separate lines, as other variables).

will listen on.
- `backend_protocol` - The protocol the service on the backend_port
- `(frontend_port | backend_protocol)` - The protocol the service on the frontend_port/backend_port
understands, e.g. `http`
- The possible options are:
- http
Expand Down
4 changes: 2 additions & 2 deletions elb_http/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ resource "aws_elb" "elb" {
listener {
instance_port = "${var.backend_port}"
instance_protocol = "${var.backend_protocol}"
lb_port = 80
lb_protocol = "http"
lb_port = "${var.frontend_port}"
lb_protocol = "${var.frontend_protocol}"
}

health_check {
Expand Down
13 changes: 13 additions & 0 deletions elb_http/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,19 @@ variable "backend_protocol" {
// - ssl (secure tcp)
}

variable "frontend_port" {
description = "The port the service on the EC2 instances listens on"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This description is for backend_port.

}

variable "frontend_protocol" {
description = "The protocol the backend service speaks"
// Possible options are
// - http
// - https
// - tcp
// - ssl (secure tcp)
}

variable "health_check_target" {
description = "The URL the ELB should use for health checks"
// This is primarily used with `http` or `https` backend protocols
Expand Down