From d99de10f8ec29d9a941ad64fd6f8af59f1bea669 Mon Sep 17 00:00:00 2001 From: Michael Gale Date: Thu, 21 Feb 2019 19:29:55 -0700 Subject: [PATCH] Fixed bug in ECS ASG based on hashicorp issue: https://github.com/hashicorp/terraform/issues/16632 --- docs.md | 2 -- ecs-cluster/main.tf | 7 ------- main.tf | 1 - 3 files changed, 10 deletions(-) diff --git a/docs.md b/docs.md index 89862249..72f09fa0 100644 --- a/docs.md +++ b/docs.md @@ -229,7 +229,6 @@ Usage: security_groups = "1,2" iam_instance_profile = "id" region = "us-west-2" - availability_zones = ["a", "b"] instance_type = "t2.small" } @@ -248,7 +247,6 @@ Usage: | security_groups | Comma separated list of security groups | - | yes | | iam_instance_profile | Instance profile ARN to use in the launch configuration | - | yes | | region | AWS Region | - | yes | -| availability_zones | List of AZs | - | yes | | instance_type | The instance type to use, e.g t2.small | - | yes | | instance_ebs_optimized | When set to true the instance will be launched with EBS optimized turned on | `true` | no | | min_size | Minimum instance count | `3` | no | diff --git a/ecs-cluster/main.tf b/ecs-cluster/main.tf index 4fae8565..37f37359 100644 --- a/ecs-cluster/main.tf +++ b/ecs-cluster/main.tf @@ -19,7 +19,6 @@ * security_groups = "1,2" * iam_instance_profile = "id" * region = "us-west-2" - * availability_zones = ["a", "b"] * instance_type = "t2.small" * } * @@ -62,11 +61,6 @@ variable "region" { description = "AWS Region" } -variable "availability_zones" { - description = "List of AZs" - type = "list" -} - variable "instance_type" { description = "The instance type to use, e.g t2.small" } @@ -223,7 +217,6 @@ resource "aws_launch_configuration" "main" { resource "aws_autoscaling_group" "main" { name = "${var.name}" - availability_zones = ["${var.availability_zones}"] vpc_zone_identifier = ["${var.subnet_ids}"] launch_configuration = "${aws_launch_configuration.main.id}" min_size = "${var.min_size}" diff --git a/main.tf b/main.tf index 45f51765..f1ed5b76 100644 --- a/main.tf +++ b/main.tf @@ -216,7 +216,6 @@ module "ecs_cluster" { max_size = "${var.ecs_max_size}" desired_capacity = "${var.ecs_desired_capacity}" region = "${var.region}" - availability_zones = "${module.vpc.availability_zones}" root_volume_size = "${var.ecs_root_volume_size}" docker_volume_size = "${var.ecs_docker_volume_size}" docker_auth_type = "${var.ecs_docker_auth_type}"