Skip to content
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

Add additional input vars and cross zone load balancing #2

Open
wants to merge 3 commits 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
11 changes: 9 additions & 2 deletions elb_http/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ It makes the following assumptions in its design:
* You'll build all your instances with an Auto-Scaling Group (ASG)
and you'll use the ASG to associate your instances with the ELB.
* Your instances behind the ELB will be in a VPC
* It only configures a listener for HTTPS
* It requires you've already uploaded an SSL certificate to EC2
* It only configures a listener for HTTP
* Cross Zone Load Balancing is enabled
* Connection Draining is enabled

It supports both (one or the other):
- Internal IP ELBs
Expand Down Expand Up @@ -38,6 +39,10 @@ Input Variables
- ssl (secure tcp)
- `health_check_target` - The URL that the ELB should use for health
checks, e.g. `HTTPS:443/health`
- `idle_timeout` - The time in seconds that the connection is allowed to be
idle. (default: 60)
- `connection_draining_timeout` - The time in seconds to allow for connections
to drain. (default: 300)

Outputs
------
Expand Down Expand Up @@ -79,3 +84,5 @@ module "my_web_elb" {
- backend_port
- backend_protocol
- health_check_target
- idle_timeout
- connection_draining_timeout
3 changes: 3 additions & 0 deletions elb_http/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,7 @@ resource "aws_elb" "elb" {
}

cross_zone_load_balancing = true
idle_timeout = "${var.idle_timeout}"
connection_draining = true
connection_draining_timeout = "${var.connection_draining_timeout}"
}
10 changes: 10 additions & 0 deletions elb_http/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@ variable "elb_is_internal" {

variable "elb_security_group" {}

variable "idle_timeout" {
description = "The time in seconds that the connection is allowed to be idle."
default = 60
}

variable "connection_draining_timeout" {
description = "The time in seconds to allow for connections to drain."
default = 300
}

variable "subnet_az1" {
description = "The subnet for AZ1"
}
Expand Down
10 changes: 10 additions & 0 deletions elb_https/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ It makes the following assumptions in its design:
* Your instances behind the ELB will be in a VPC
* It only configures a listener for HTTPS
* It requires you've already uploaded an SSL certificate to EC2
* Cross Zone Load Balancing is enabled
* Connection Draining is enabled

It supports both (one or the other):
- Internal IP ELBs
Expand All @@ -25,6 +27,8 @@ Input Variables
- `elb_security_group` - The Security Group to associate with the ELB
- `elb_is_internal` - Defaults to `false`, you can set to `true` to make
the ELB have an internal IP
- `idle_timeout` - (Optional)
- `connection_draining_timeout` - (Optional)
- `ssl_certificate_id` - The ARN of the SSL certificate
- `subnet_az1` - The VPC subnet ID for AZ1
- `subnet_az2` - The VPC subnet ID for AZ2
Expand All @@ -39,6 +43,10 @@ Input Variables
- ssl (secure tcp)
- `health_check_target` - The URL that the ELB should use for health
checks, e.g. `HTTPS:443/health`
- `idle_timeout` - The time in seconds that the connection is allowed to be
idle. (default: 60)
- `connection_draining_timeout` - The time in seconds to allow for connections
to drain. (default: 300)

Outputs
------
Expand Down Expand Up @@ -82,3 +90,5 @@ module "my_web_elb" {
- backend_protocol
- ssl_certificate_id
- health_check_target
- idle_timeout
- connection_draining_timeout
3 changes: 3 additions & 0 deletions elb_https/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,7 @@ resource "aws_elb" "elb" {
}

cross_zone_load_balancing = true
idle_timeout = "${var.idle_timeout}"
connection_draining = true
connection_draining_timeout = "${var.connection_draining_timeout}"
}
10 changes: 10 additions & 0 deletions elb_https/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@ variable "elb_is_internal" {

variable "elb_security_group" {}

variable "idle_timeout" {
description = "The time in seconds that the connection is allowed to be idle."
default = 60
}

variable "connection_draining_timeout" {
description = "The time in seconds to allow for connections to drain."
default = 300
}

// See README.md for details on finding the
// ARN of an SSL certificate in EC2
variable "ssl_certificate_id" {
Expand Down