Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

Commit

Permalink
removed availability_zones from asg (#247)
Browse files Browse the repository at this point in the history
`azs` attribute is for legacy EC2 ASG, which we do not have plan to support any more. Now with terraform 0.12, it causes inconsistent plan issue. So it has to go.
  • Loading branch information
JoseD92 authored and Magicloud committed Nov 19, 2019
1 parent 6ce0363 commit e1e21fb
Show file tree
Hide file tree
Showing 9 changed files with 0 additions and 13 deletions.
1 change: 0 additions & 1 deletion examples/asg-lifecycle-hooks/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ resource "aws_sns_topic" "main" {
module "asg" {
source = "../../modules/asg"
name_prefix = var.name_prefix
azs = local.azs
elb_names = [aws_elb.web.name]
subnet_ids = module.vpc.public_subnet_ids
min_nodes = 1
Expand Down
1 change: 0 additions & 1 deletion examples/load-asg/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ module "ubuntu-xenial-ami" {
module "web-asg" {
source = "../../modules/asg"
ami = module.ubuntu-xenial-ami.id
azs = local.azs
name_prefix = "${var.name}-${var.web_app_name}"
elb_names = [aws_elb.web.name]
instance_type = var.instance_type
Expand Down
1 change: 0 additions & 1 deletion examples/vpc-scenario-2-nat-instance/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,6 @@ resource "aws_elb" "web" {
module "web" {
source = "../../modules/asg"
ami = module.ubuntu-xenial-ami.id
azs = slice(data.aws_availability_zones.available.names, 0, 3)
name_prefix = var.name
name_suffix = "webapp-server"
elb_names = [aws_elb.web.name]
Expand Down
1 change: 0 additions & 1 deletion examples/vpc-scenario-2-nat-instances-per-az/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,6 @@ resource "aws_elb" "web" {
module "web" {
source = "../../modules/asg"
ami = module.ubuntu-xenial-ami.id
azs = slice(data.aws_availability_zones.available.names, 0, 3)
name_prefix = var.name
name_suffix = "webapp-server"
elb_names = [aws_elb.web.name]
Expand Down
1 change: 0 additions & 1 deletion examples/vpc-scenario-2/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ resource "aws_elb" "web" {
module "web" {
source = "../../modules/asg"
ami = module.ubuntu-xenial-ami.id
azs = local.azs
name_prefix = "${var.name}-web"
elb_names = [aws_elb.web.name]
instance_type = "t2.nano"
Expand Down
1 change: 0 additions & 1 deletion examples/vpc-scenario-3/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ resource "aws_elb" "web" {
module "web" {
source = "../../modules/asg"
ami = module.ubuntu-xenial-ami.id
azs = local.azs
name_prefix = "${var.name}-web"
elb_names = [aws_elb.web.name]
instance_type = "t2.nano"
Expand Down
1 change: 0 additions & 1 deletion modules/asg/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
*/
# Auto-Scaling Group
resource "aws_autoscaling_group" "cluster" {
availability_zones = var.azs
force_delete = true
health_check_grace_period = 300
health_check_type = var.health_check_type
Expand Down
5 changes: 0 additions & 5 deletions modules/asg/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,6 @@ variable "public_ip" {
type = string
}

variable "azs" {
description = "list of availability zones to associate with the ASG"
type = list(string)
}

variable "subnet_ids" {
description = "list of subnets to associate with the ASG (by id)"
type = list(string)
Expand Down
1 change: 0 additions & 1 deletion tests/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ module "asg" {
source = "../modules/asg"

ami = ""
azs = []
key_name = ""
max_nodes = ""
min_nodes = ""
Expand Down

0 comments on commit e1e21fb

Please sign in to comment.