Skip to content

Commit

Permalink
add optional load_balancers option (#37)
Browse files Browse the repository at this point in the history
* add optional load_balancers option

* updated documentation
  • Loading branch information
James Albert authored and tfhartmann committed Sep 21, 2018
1 parent dbe7c16 commit c31f66e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Module Input Variables
- `min_servers` - Minimum number of ECS Servers to start in the cluster - defaults to 1
- `max_servers` - Maximum number of ECS Servers to start in the cluster - defaults to 10
- `instance_type` - AWS instance type - defaults to t2.micro
- `load_balancers` - List of elastic load balancer (classic only) names to put in front of your instances - defaults to []
- `iam_path` - IAM path, this is useful when creating resources with the same name across multiple regions. Defaults to /
- `associate_public_ip_address` - assign a publicly-routable IP address to every instance in the cluster - default: `false`.
- `docker_storage_size` - EBS Volume size in Gib that the ECS Instance uses for Docker images and metadata - defaults to 22
Expand Down
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ resource "aws_autoscaling_group" "ecs" {
max_size = "${var.max_servers}"
desired_capacity = "${var.servers}"
termination_policies = ["OldestLaunchConfiguration", "ClosestToNextInstanceHour", "Default"]
load_balancers = ["${var.load_balancers}"]

tags = [{
key = "Name"
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ variable "key_name" {
description = "SSH key name in your AWS account for AWS instances."
}

variable "load_balancers" {
type = "list"
default = []
description = "A list of elastic load balancer names to add to the autoscaling group names. Only valid for classic load balancers."
}

variable "min_servers" {
description = "Minimum number of ECS servers to run."
default = 1
Expand Down

0 comments on commit c31f66e

Please sign in to comment.