Rename worker pool modules' count variable to worker_count

* This change affects users who use worker pools on AWS, GCP, or
Azure with a Container Linux derivative
* Rename worker pool modules' `count` variable to `worker_count`,
because `count` will be a reserved variable name in Terraform v0.12
This commit is contained in:
Dalton Hubble
2019-05-27 16:33:21 -07:00
parent d9e7195477
commit c565f9fd47
11 changed files with 34 additions and 22 deletions

View File

@ -6,7 +6,7 @@ module "workers" {
vpc_id = "${aws_vpc.network.id}"
subnet_ids = ["${aws_subnet.public.*.id}"]
security_groups = ["${aws_security_group.worker.id}"]
count = "${var.worker_count}"
worker_count = "${var.worker_count}"
instance_type = "${var.worker_type}"
os_image = "${var.os_image}"
disk_size = "${var.disk_size}"

View File

@ -22,7 +22,7 @@ variable "security_groups" {
# instances
variable "count" {
variable "worker_count" {
type = "string"
default = "1"
description = "Number of instances"

View File

@ -3,9 +3,9 @@ resource "aws_autoscaling_group" "workers" {
name = "${var.name}-worker ${aws_launch_configuration.worker.name}"
# count
desired_capacity = "${var.count}"
min_size = "${var.count}"
max_size = "${var.count + 2}"
desired_capacity = "${var.worker_count}"
min_size = "${var.worker_count}"
max_size = "${var.worker_count + 2}"
default_cooldown = 30
health_check_grace_period = 30