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

Error updating Autoscaling group: minimum field size of 1, UpdateAutoScalingGroupInput.VPCZoneIdentifier #12150

Closed
brikis98 opened this issue Feb 22, 2017 · 2 comments

Comments

@brikis98
Copy link
Contributor

Terraform Version

Terraform v0.8.6

Affected Resource(s)

  • aws_autoscaling_group

Terraform Configuration Files

In a module, I have the following:

resource "aws_autoscaling_group" "autoscaling_group" {
  launch_configuration = "${aws_launch_configuration.launch_configuration.name}"

  availability_zones  = ["${var.availability_zones}"]
  vpc_zone_identifier = ["${var.subnet_ids}"]

  min_size             = 3
  max_size             = 3
  desired_capacity     = 3
}

variable "availability_zones" {
  type = "list"
  default = []
}

variable "subnet_ids" {
  type = "list"
  default = []
}

My usage of the module looks something like this:

module "foo" {
  source = "modules/foo"

  availability_zones = ["${data.aws_availability_zones.all.names}"]
}

data "aws_availability_zones" "all" {}

Expected Behavior

  1. I should be able to run terraform apply without errors.
  2. I should be able to run terraform plan after the initial apply and see no changes.

Actual Behavior

  1. I am able to run terraform apply without errors.

  2. When I run terraform plan, I see the following diff, even though I haven't changed anything:

    ~ module.consul.aws_autoscaling_group.autoscaling_group
        vpc_zone_identifier.#: "1" => "0"
        vpc_zone_identifier.0: "" => ""
    

    Even worse, if I run terraform apply now, I get an error:

    * aws_autoscaling_group.autoscaling_group: Error updating Autoscaling group: InvalidParameter: 1 validation error(s) found.
    - minimum field size of 1, UpdateAutoScalingGroupInput.VPCZoneIdentifier.
    

This makes it impossible to apply any further changes.

Steps to Reproduce

  1. terraform apply
  2. terraform plan
  3. terraform apply

References

@brikis98
Copy link
Contributor Author

Has anyone had a chance to look into this one? With this bug, you can no longer use the Auto Scaling Group resource, at all, with a list of availability zones.

@ghost
Copy link

ghost commented Apr 9, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants