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 applying in v0.10.0 - diffs didn't match during apply - attribute mismatch: availability_zones #15810

Closed
davidgenn opened this issue Aug 15, 2017 · 22 comments
Labels

Comments

@davidgenn
Copy link

davidgenn commented Aug 15, 2017

Terraform Version

0.10.0

Terraform Configuration Files

NA

Debug Output

https://gist.github.com/davidgenn/31798c84e48c5b6c55151ed9c9e71fb9

Panic Output

NA

Expected Behavior

Run terraform apply

AWS resources created.

Actual Behavior

AWS resources partially created. Diff error returned.

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. Download https://gist.github.com/davidgenn/3db8f6d44ca7436d0764e78fafe12f63
  2. Enter AWS keys
  3. terraform apply

Important Factoids

This was previously working under version 0.9.11

References

NA

@catsby catsby added the bug label Aug 15, 2017
@catsby
Copy link
Contributor

catsby commented Aug 15, 2017

Hey @davidgenn do you by chance have a configuration that reproduces this that you could share? Please be sure not to share any secrets if you do.

@catsby catsby added the waiting-response An issue/pull request is waiting for a response from the community label Aug 15, 2017
@simonsparks
Copy link

I've been experiencing this as well.
Here is the information supplied in the error message:

    Terraform Version: 0.10.0
    Resource ID: aws_autoscaling_group.controller
    Mismatch reason: attribute mismatch: availability_zones.1924028850
    Diff One (usually from plan): *terraform.InstanceDiff{mu:sync.Mutex{state:0, sema:0x0}, Attributes:map[string]*terraform.ResourceAttrDiff{"tag.1760052960.value":*terraform.ResourceAttrDiff{Old:"", New:"sds-dev-2-controller-eu-west-1-t2.small", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "min_size":*terraform.ResourceAttrDiff{Old:"", New:"3", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.2332965468.key":*terraform.ResourceAttrDiff{Old:"", New:"Type", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.1760052960.key":*terraform.ResourceAttrDiff{Old:"", New:"Name", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.1263038888.key":*terraform.ResourceAttrDiff{Old:"", New:"Machine", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.1263038888.propagate_at_launch":*terraform.ResourceAttrDiff{Old:"", New:"true", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "health_check_grace_period":*terraform.ResourceAttrDiff{Old:"", New:"300", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "availability_zones.#":*terraform.ResourceAttrDiff{Old:"", New:"3", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "health_check_type":*terraform.ResourceAttrDiff{Old:"", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "force_delete":*terraform.ResourceAttrDiff{Old:"", New:"false", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "desired_capacity":*terraform.ResourceAttrDiff{Old:"", New:"3", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.1263038888.value":*terraform.ResourceAttrDiff{Old:"", New:"t2.small", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "arn":*terraform.ResourceAttrDiff{Old:"", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "target_group_arns.#":*terraform.ResourceAttrDiff{Old:"", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "availability_zones.3953592328":*terraform.ResourceAttrDiff{Old:"", New:"eu-west-1a", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "max_size":*terraform.ResourceAttrDiff{Old:"", New:"3", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "launch_configuration":*terraform.ResourceAttrDiff{Old:"", New:"sds-dev-2-controller", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "load_balancers.2605541483":*terraform.ResourceAttrDiff{Old:"", New:"sds-dev-2-controller-lb", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "availability_zones.94988580":*terraform.ResourceAttrDiff{Old:"", New:"eu-west-1c", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.2332965468.propagate_at_launch":*terraform.ResourceAttrDiff{Old:"", New:"true", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "load_balancers.#":*terraform.ResourceAttrDiff{Old:"", New:"1", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.2332965468.value":*terraform.ResourceAttrDiff{Old:"", New:"sds-dev-2-controller", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "vpc_zone_identifier.#":*terraform.ResourceAttrDiff{Old:"", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "metrics_granularity":*terraform.ResourceAttrDiff{Old:"", New:"1Minute", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "availability_zones.1924028850":*terraform.ResourceAttrDiff{Old:"", New:"eu-west-1b", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "wait_for_capacity_timeout":*terraform.ResourceAttrDiff{Old:"", New:"10m", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "protect_from_scale_in":*terraform.ResourceAttrDiff{Old:"", New:"false", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "default_cooldown":*terraform.ResourceAttrDiff{Old:"", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "name":*terraform.ResourceAttrDiff{Old:"", New:"sds-dev-2-controller", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Sensitive:false, Type:0x0}, "tag.#":*terraform.ResourceAttrDiff{Old:"", New:"3", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.1760052960.propagate_at_launch":*terraform.ResourceAttrDiff{Old:"", New:"true", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}}, Destroy:false, DestroyDeposed:false, DestroyTainted:false, Meta:map[string]interface {}(nil)}
    Diff Two (usually from apply): *terraform.InstanceDiff{mu:sync.Mutex{state:0, sema:0x0}, Attributes:map[string]*terraform.ResourceAttrDiff{"tag.2332965468.value":*terraform.ResourceAttrDiff{Old:"", New:"sds-dev-2-controller", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "target_group_arns.#":*terraform.ResourceAttrDiff{Old:"", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.2332965468.key":*terraform.ResourceAttrDiff{Old:"", New:"Type", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "wait_for_capacity_timeout":*terraform.ResourceAttrDiff{Old:"", New:"10m", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.2332965468.propagate_at_launch":*terraform.ResourceAttrDiff{Old:"", New:"true", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "load_balancers.2605541483":*terraform.ResourceAttrDiff{Old:"", New:"sds-dev-2-controller-lb", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "name":*terraform.ResourceAttrDiff{Old:"", New:"sds-dev-2-controller", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Sensitive:false, Type:0x0}, "min_size":*terraform.ResourceAttrDiff{Old:"", New:"3", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "launch_configuration":*terraform.ResourceAttrDiff{Old:"", New:"sds-dev-2-controller", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.1760052960.propagate_at_launch":*terraform.ResourceAttrDiff{Old:"", New:"true", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.1760052960.value":*terraform.ResourceAttrDiff{Old:"", New:"sds-dev-2-controller-eu-west-1-t2.small", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.1263038888.propagate_at_launch":*terraform.ResourceAttrDiff{Old:"", New:"true", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "metrics_granularity":*terraform.ResourceAttrDiff{Old:"", New:"1Minute", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "max_size":*terraform.ResourceAttrDiff{Old:"", New:"3", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "vpc_zone_identifier.1588229282":*terraform.ResourceAttrDiff{Old:"", New:"subnet-df139996", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.#":*terraform.ResourceAttrDiff{Old:"", New:"3", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "load_balancers.#":*terraform.ResourceAttrDiff{Old:"", New:"1", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.1263038888.key":*terraform.ResourceAttrDiff{Old:"", New:"Machine", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "health_check_grace_period":*terraform.ResourceAttrDiff{Old:"", New:"300", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "protect_from_scale_in":*terraform.ResourceAttrDiff{Old:"", New:"false", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.1760052960.key":*terraform.ResourceAttrDiff{Old:"", New:"Name", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "vpc_zone_identifier.4058919805":*terraform.ResourceAttrDiff{Old:"", New:"subnet-78d4591f", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.1263038888.value":*terraform.ResourceAttrDiff{Old:"", New:"t2.small", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "desired_capacity":*terraform.ResourceAttrDiff{Old:"", New:"3", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "health_check_type":*terraform.ResourceAttrDiff{Old:"", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "vpc_zone_identifier.2247373532":*terraform.ResourceAttrDiff{Old:"", New:"subnet-7c7bb527", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "force_delete":*terraform.ResourceAttrDiff{Old:"", New:"false", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "arn":*terraform.ResourceAttrDiff{Old:"", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "default_cooldown":*terraform.ResourceAttrDiff{Old:"", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "vpc_zone_identifier.#":*terraform.ResourceAttrDiff{Old:"", New:"3", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}}, Destroy:false, DestroyDeposed:false, DestroyTainted:false, Meta:map[string]interface {}(nil)}

The main auto scaling group configuration looks like this:

resource "aws_launch_configuration" "controller" {
  provider                    = "aws.${var.region}"
  name                        = "${var.name}"
  image_id                    = "${var.image}"
  instance_type               = "${var.machine_type}"
  user_data                   = "${data.template_file.controller.rendered}"
  associate_public_ip_address = false
  iam_instance_profile        = "${aws_iam_instance_profile.controller.id}"
  security_groups             = ["${aws_security_group.controller.id}"]
  key_name                    = "${var.key_name}"

  root_block_device {
    volume_type = "gp2"
    volume_size = "${var.disk_size}"
  }
}

resource "aws_autoscaling_group" "controller" {
  provider              = "aws.${var.region}"
  name                  = "${aws_launch_configuration.controller.name}"
  launch_configuration  = "${aws_launch_configuration.controller.name}"
  desired_capacity      = "${var.servers}"
  min_size              = "${var.servers}"
  max_size              = "${var.servers}"
  availability_zones    = ["${var.zones}"]
  vpc_zone_identifier   = ["${var.private_subnet_ids}"]
  load_balancers        = ["${module.controller_lb.lb_name}"]

  tag {
    key   = "Name"
    value = "${var.name}-${var.region}-${var.machine_type}"
    propagate_at_launch = true
  }

  tag {
    key   = "Type"
    value = "${var.name}"
    propagate_at_launch = true
  }

  tag {
    key   = "Machine"
    value = "${var.machine_type}"
    propagate_at_launch = true
  }
}

I notice that running terraform apply for the first time causes this error but running it the next time works.

@ststarcount
Copy link

Hi, we've been experiencing the same issue using v0.9.11 when creating an aws_emr_instance_group. A gist of the error can be found here.

@catsby catsby removed the waiting-response An issue/pull request is waiting for a response from the community label Aug 15, 2017
@rockholla
Copy link

Also seeing this one in version 0.10.0, here's a gist of the debug output:

https://gist.github.com/rockholla/4bf918d132f32abb73a25f8c09adf73c

And related config for the auto scaling group:

resource "aws_autoscaling_group" "main" {
  name = "${var.name}-scaling"

  availability_zones   = ["${var.availability_zones}"]
  vpc_zone_identifier  = ["${var.subnet_ids}"]
  launch_configuration = "${aws_launch_configuration.main.id}"
  min_size             = "${var.min_size}"
  max_size             = "${var.max_size}"
  desired_capacity     = "${var.desired_capacity}"
  termination_policies = ["OldestLaunchConfiguration", "Default"]

  tag {
    key                 = "Name"
    value               = "${var.name}-host"
    propagate_at_launch = true
  }

  tag {
    key                 = "Cluster"
    value               = "${var.name}"
    propagate_at_launch = true
  }

  tag {
    key                 = "Environment"
    value               = "${var.environment}"
    propagate_at_launch = true
  }

  lifecycle {
    create_before_destroy = true
  }
}

@salemgolemugoo
Copy link

Same issue with autoscaling group in 0.10.0, 0.10.1, 0.10.2

@technolithic
Copy link

Experiencing similar issues with autoscaling group an 0.10.2

@dweomer
Copy link

dweomer commented Aug 26, 2017

I have been noticing this issue (mismatched diffs for AZ on ASG) as well since 0.10.x. Second terraform apply works fine.

@thnee
Copy link

thnee commented Aug 30, 2017

Same here, on 0.10.2.

Trying to create an auto scaling group:

resource "aws_autoscaling_group" "main" {
  name = "rabbitmq"
  launch_configuration = "${aws_launch_configuration.main.name}"
  vpc_zone_identifier = ["${aws_subnet.main.id}"]
  availability_zones = ["${var.availability_zone}"]
  min_size = "${var.scaling_group_min_size}"
  max_size = "${var.scaling_group_max_size}"
  force_delete = false
  load_balancers = ["rabbitmq"]
  health_check_type = "ELB"
  health_check_grace_period = 300

  lifecycle {
    create_before_destroy = true
  }
}

First time running apply produces this output:

* aws_autoscaling_group.main: aws_autoscaling_group.main: diffs didn't match during apply. This is a bug with Terraform and should be reported as a GitHub Issue.

Please include the following information in your report:

    Terraform Version: 0.10.2
    Resource ID: aws_autoscaling_group.main
    Mismatch reason: attribute mismatch: availability_zones.1126047633
    Diff One (usually from plan): *terraform.InstanceDiff{mu:sync.Mutex{state:0, sema:0x0}, Attributes:map[string]*terraform.ResourceAttrDiff{"wait_for_capacity_timeout":*terraform.ResourceAttrDiff{Old:"", New:"10m", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "health_check_type":*terraform.ResourceAttrDiff{Old:"", New:"ELB", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "availability_zones.#":*terraform.ResourceAttrDiff{Old:"", New:"1", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "availability_zones.1126047633":*terraform.ResourceAttrDiff{Old:"", New:"eu-central-1a", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "metrics_granularity":*terraform.ResourceAttrDiff{Old:"", New:"1Minute", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "load_balancers.#":*terraform.ResourceAttrDiff{Old:"", New:"1", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "vpc_zone_identifier.#":*terraform.ResourceAttrDiff{Old:"", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "name":*terraform.ResourceAttrDiff{Old:"", New:"rabbitmq", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Sensitive:false, Type:0x0}, "protect_from_scale_in":*terraform.ResourceAttrDiff{Old:"", New:"false", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "desired_capacity":*terraform.ResourceAttrDiff{Old:"", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "load_balancers.3806308588":*terraform.ResourceAttrDiff{Old:"", New:"rabbitmq", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "default_cooldown":*terraform.ResourceAttrDiff{Old:"", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "arn":*terraform.ResourceAttrDiff{Old:"", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "force_delete":*terraform.ResourceAttrDiff{Old:"", New:"false", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "max_size":*terraform.ResourceAttrDiff{Old:"", New:"1", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "target_group_arns.#":*terraform.ResourceAttrDiff{Old:"", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "launch_configuration":*terraform.ResourceAttrDiff{Old:"", New:"rabbitmq", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "min_size":*terraform.ResourceAttrDiff{Old:"", New:"1", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "health_check_grace_period":*terraform.ResourceAttrDiff{Old:"", New:"300", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}}, Destroy:false, DestroyDeposed:false, DestroyTainted:false, Meta:map[string]interface {}(nil)}
    Diff Two (usually from apply): *terraform.InstanceDiff{mu:sync.Mutex{state:0, sema:0x0}, Attributes:map[string]*terraform.ResourceAttrDiff{"metrics_granularity":*terraform.ResourceAttrDiff{Old:"", New:"1Minute", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "load_balancers.#":*terraform.ResourceAttrDiff{Old:"", New:"1", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "launch_configuration":*terraform.ResourceAttrDiff{Old:"", New:"rabbitmq", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "force_delete":*terraform.ResourceAttrDiff{Old:"", New:"false", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "default_cooldown":*terraform.ResourceAttrDiff{Old:"", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "min_size":*terraform.ResourceAttrDiff{Old:"", New:"1", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "health_check_grace_period":*terraform.ResourceAttrDiff{Old:"", New:"300", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "vpc_zone_identifier.3000042260":*terraform.ResourceAttrDiff{Old:"", New:"subnet-1bd93670", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "target_group_arns.#":*terraform.ResourceAttrDiff{Old:"", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "desired_capacity":*terraform.ResourceAttrDiff{Old:"", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "max_size":*terraform.ResourceAttrDiff{Old:"", New:"1", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "vpc_zone_identifier.#":*terraform.ResourceAttrDiff{Old:"", New:"1", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "name":*terraform.ResourceAttrDiff{Old:"", New:"rabbitmq", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Sensitive:false, Type:0x0}, "arn":*terraform.ResourceAttrDiff{Old:"", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "protect_from_scale_in":*terraform.ResourceAttrDiff{Old:"", New:"false", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "load_balancers.3806308588":*terraform.ResourceAttrDiff{Old:"", New:"rabbitmq", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "health_check_type":*terraform.ResourceAttrDiff{Old:"", New:"ELB", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "wait_for_capacity_timeout":*terraform.ResourceAttrDiff{Old:"", New:"10m", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}}, Destroy:false, DestroyDeposed:false, DestroyTainted:false, Meta:map[string]interface {}(nil)}

Second time running apply, it works.

@dirkjonker
Copy link

Can confirm this behavior. Running apply again makes it work without any errors.

@Vlaaaaaaad
Copy link

Can confirm this issue too. Second apply works perfectly(without any other modification).

If needed I can provide my configuration but it's nothing too exotic( ALB + 2 ASGs in 2 AZs).

@andrewschleifer
Copy link

andrewschleifer commented Sep 9, 2017

Remove the availability_zones from the aws_autoscaling_group definition as a work-around (since they can be derived from the vpc_zone_identifier). I've got some notes about the cause in hashicorp/terraform-provider-aws#1630.

@saxonww
Copy link

saxonww commented Nov 10, 2017

Just encountered this myself, eliminating availability_zones resolved the issue for me. I observed that all the desired availability zones (matching those from the configured subnets) were assigned to the scaling group after creation.

@ghost
Copy link

ghost commented Nov 21, 2017

Same here in Terraform v0.11.0 when creating a new auto scaling group (availability_zones is set)

@aaomoware
Copy link

same issue with aws_elb

Error: Error applying plan:

1 error(s) occurred:

* module.elb.aws_elb.elb: aws_elb.elb: diffs didn't match during apply. This is a bug with Terraform and should be reported as a GitHub Issue.

Please include the following information in your report:

    Terraform Version: 0.10.8
    Resource ID: aws_elb.elb
    Mismatch reason: attribute mismatch: instances.#
    Diff One (usually from plan): *terraform.InstanceDiff{mu:sync.Mutex{state:0, sema:0x0}, Attributes:map[string]*terraform.ResourceAttrDiff{"instances.3413436053":*terraform.ResourceAttrDiff{Old:"i-0fa5cb9290b07cc7a", New:"", NewComputed:false, NewRemoved:true, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "instances.3101040752":*terraform.ResourceAttrDiff{Old:"i-0ff5ce6a2ad535760", New:"", NewComputed:false, NewRemoved:true, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "instances.2191194232":*terraform.ResourceAttrDiff{Old:"i-0618c8627f58f35e7", New:"", NewComputed:false, NewRemoved:true, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "instances.2096139226":*terraform.ResourceAttrDiff{Old:"i-039c9be757e49d4c4", New:"", NewComputed:false, NewRemoved:true, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "instances.710225761":*terraform.ResourceAttrDiff{Old:"i-09d5fbd1b25c809b2", New:"i-09d5fbd1b25c809b2", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "instances.794992413":*terraform.ResourceAttrDiff{Old:"i-0ecae88f95e2f5374", New:"", NewComputed:false, NewRemoved:true, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "instances.1582521923":*terraform.ResourceAttrDiff{Old:"i-0192407ffba6a8bb2", New:"", NewComputed:false, NewRemoved:true, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "instances.752469874":*terraform.ResourceAttrDiff{Old:"i-04f4f9147bed39627", New:"", NewComputed:false, NewRemoved:true, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "instances.2300626290":*terraform.ResourceAttrDiff{Old:"i-08653133934dea64a", New:"", NewComputed:false, NewRemoved:true, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "instances.299890083":*terraform.ResourceAttrDiff{Old:"i-0321c57bd963b2328", New:"", NewComputed:false, NewRemoved:true, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "instances.3734017956":*terraform.ResourceAttrDiff{Old:"i-00a7984ade2b66dc6", New:"", NewComputed:false, NewRemoved:true, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "instances.901745767":*terraform.ResourceAttrDiff{Old:"i-0f0df07d6a4013b74", New:"", NewComputed:false, NewRemoved:true, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "instances.2142555291":*terraform.ResourceAttrDiff{Old:"i-0f8faa1a00b395599", New:"", NewComputed:false, NewRemoved:true, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "instances.#":*terraform.ResourceAttrDiff{Old:"20", New:"3", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "instances.3542910439":*terraform.ResourceAttrDiff{Old:"i-0004f810f542e6b68", New:"", NewComputed:false, NewRemoved:true, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "instances.3826699558":*terraform.ResourceAttrDiff{Old:"i-032053f594117f477", New:"", NewComputed:false, NewRemoved:true, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "instances.424000913":*terraform.ResourceAttrDiff{Old:"i-099f264c11c46434f", New:"", NewComputed:false, NewRemoved:true, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "instances.2936905398":*terraform.ResourceAttrDiff{Old:"i-0892bf87ea2c503fb", New:"", NewComputed:false, NewRemoved:true, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "instances.2268853288":*terraform.ResourceAttrDiff{Old:"i-0b32a848c7d9f69a5", New:"i-0b32a848c7d9f69a5", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "instances.1901399340":*terraform.ResourceAttrDiff{Old:"i-0c6af8141634ff6b1", New:"i-0c6af8141634ff6b1", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "instances.1943296506":*terraform.ResourceAttrDiff{Old:"i-0635c3130fa753a60", New:"", NewComputed:false, NewRemoved:true, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}}, Destroy:false, DestroyDeposed:false, DestroyTainted:false, Meta:map[string]interface {}(nil)}
    Diff Two (usually from apply): *terraform.InstanceDiff{mu:sync.Mutex{state:0, sema:0x0}, Attributes:map[string]*terraform.ResourceAttrDiff(nil), Destroy:false, DestroyDeposed:false, DestroyTainted:false, Meta:map[string]interface {}(nil)}

Also include as much context as you can about your config, state, and the steps you performed to trigger this error.

@jstoner
Copy link

jstoner commented Feb 16, 2018

I am automating updates across our business and seeing 133 of these failures. Here's one:


Please include the following information in your report:

    Terraform Version: 0.11.3
    Resource ID: aws_autoscaling_group.asg
    Mismatch reason: extra attributes: launch_configuration
    Diff One (usually from plan): *terraform.InstanceDiff{mu:sync.Mutex{state:0, sema:0x0}, Attributes:map[string]*terraform.ResourceAttrDiff{"tag.#":*terraform.ResourceAttrDiff{Old:"6", New:"9", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.3450674018.propagate_at_launch":*terraform.ResourceAttrDiff{Old:"true", New:"false", NewComputed:false, NewRemoved:true, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.2985144217.propagate_at_launch":*terraform.ResourceAttrDiff{Old:"true", New:"true", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.1821950404.propagate_at_launch":*terraform.ResourceAttrDiff{Old:"true", New:"false", NewComputed:false, NewRemoved:true, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.2741428326.key":*terraform.ResourceAttrDiff{Old:"", New:"requester", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.1486810854.key":*terraform.ResourceAttrDiff{Old:"service", New:"service", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.3192484707.key":*terraform.ResourceAttrDiff{Old:"", New:"healing-strategy", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.1765666997.key":*terraform.ResourceAttrDiff{Old:"", New:"provisioned-by", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.1486810854.value":*terraform.ResourceAttrDiff{Old:"kafka-zk", New:"kafka-zk", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.1821950404.value":*terraform.ResourceAttrDiff{Old:"qa3 Zookeeper", New:"", NewComputed:false, NewRemoved:true, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.425502265.key":*terraform.ResourceAttrDiff{Old:"cluster", New:"cluster", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.1765666997.value":*terraform.ResourceAttrDiff{Old:"", New:"terraform", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.214323007.propagate_at_launch":*terraform.ResourceAttrDiff{Old:"", New:"true", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "vpc_zone_identifier.3068254804":*terraform.ResourceAttrDiff{Old:"", New:"subnet-9e171fc6", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "vpc_zone_identifier.#":*terraform.ResourceAttrDiff{Old:"1", New:"1", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.3192484707.propagate_at_launch":*terraform.ResourceAttrDiff{Old:"", New:"true", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.2985144217.key":*terraform.ResourceAttrDiff{Old:"application", New:"application", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.425502265.propagate_at_launch":*terraform.ResourceAttrDiff{Old:"true", New:"true", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.3476914036.key":*terraform.ResourceAttrDiff{Old:"island", New:"island", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.2605131061.key":*terraform.ResourceAttrDiff{Old:"", New:"Name", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.2605131061.propagate_at_launch":*terraform.ResourceAttrDiff{Old:"", New:"true", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.3192484707.value":*terraform.ResourceAttrDiff{Old:"", New:"manual", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.2605131061.value":*terraform.ResourceAttrDiff{Old:"", New:"kafka-qa3-qa-cchg-zookeeper", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.3450674018.key":*terraform.ResourceAttrDiff{Old:"environment", New:"", NewComputed:false, NewRemoved:true, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.3450674018.value":*terraform.ResourceAttrDiff{Old:"qa3", New:"", NewComputed:false, NewRemoved:true, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.1765666997.propagate_at_launch":*terraform.ResourceAttrDiff{Old:"", New:"true", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "vpc_zone_identifier.172886254":*terraform.ResourceAttrDiff{Old:"subnet-769ae62f", New:"", NewComputed:false, NewRemoved:true, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.1486810854.propagate_at_launch":*terraform.ResourceAttrDiff{Old:"true", New:"true", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.2741428326.value":*terraform.ResourceAttrDiff{Old:"", New:"development", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.214323007.key":*terraform.ResourceAttrDiff{Old:"", New:"purpose", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "min_size":*terraform.ResourceAttrDiff{Old:"3", New:"0", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.3476914036.value":*terraform.ResourceAttrDiff{Old:"qa", New:"qa", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.3476914036.propagate_at_launch":*terraform.ResourceAttrDiff{Old:"true", New:"true", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.214323007.value":*terraform.ResourceAttrDiff{Old:"", New:"", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.425502265.value":*terraform.ResourceAttrDiff{Old:"qa3", New:"qa3", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.2985144217.value":*terraform.ResourceAttrDiff{Old:"kafka", New:"kafka", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.2741428326.propagate_at_launch":*terraform.ResourceAttrDiff{Old:"", New:"true", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.1821950404.key":*terraform.ResourceAttrDiff{Old:"Name", New:"", NewComputed:false, NewRemoved:true, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}}, Destroy:false, DestroyDeposed:false, DestroyTainted:false, Meta:map[string]interface {}(nil)}
    Diff Two (usually from apply): *terraform.InstanceDiff{mu:sync.Mutex{state:0, sema:0x0}, Attributes:map[string]*terraform.ResourceAttrDiff{"tag.3450674018.key":*terraform.ResourceAttrDiff{Old:"environment", New:"", NewComputed:false, NewRemoved:true, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.2741428326.propagate_at_launch":*terraform.ResourceAttrDiff{Old:"", New:"true", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.1486810854.propagate_at_launch":*terraform.ResourceAttrDiff{Old:"true", New:"true", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.214323007.propagate_at_launch":*terraform.ResourceAttrDiff{Old:"", New:"true", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.3192484707.key":*terraform.ResourceAttrDiff{Old:"", New:"healing-strategy", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.#":*terraform.ResourceAttrDiff{Old:"6", New:"9", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "vpc_zone_identifier.#":*terraform.ResourceAttrDiff{Old:"1", New:"1", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.2985144217.propagate_at_launch":*terraform.ResourceAttrDiff{Old:"true", New:"true", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "min_size":*terraform.ResourceAttrDiff{Old:"3", New:"0", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.1486810854.key":*terraform.ResourceAttrDiff{Old:"service", New:"service", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.2605131061.propagate_at_launch":*terraform.ResourceAttrDiff{Old:"", New:"true", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.3450674018.value":*terraform.ResourceAttrDiff{Old:"qa3", New:"", NewComputed:false, NewRemoved:true, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.1821950404.propagate_at_launch":*terraform.ResourceAttrDiff{Old:"true", New:"false", NewComputed:false, NewRemoved:true, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.425502265.value":*terraform.ResourceAttrDiff{Old:"qa3", New:"qa3", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.425502265.propagate_at_launch":*terraform.ResourceAttrDiff{Old:"true", New:"true", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.2985144217.value":*terraform.ResourceAttrDiff{Old:"kafka", New:"kafka", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.2741428326.value":*terraform.ResourceAttrDiff{Old:"", New:"development", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.1765666997.value":*terraform.ResourceAttrDiff{Old:"", New:"terraform", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.3192484707.value":*terraform.ResourceAttrDiff{Old:"", New:"manual", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.2605131061.key":*terraform.ResourceAttrDiff{Old:"", New:"Name", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.425502265.key":*terraform.ResourceAttrDiff{Old:"cluster", New:"cluster", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.1821950404.key":*terraform.ResourceAttrDiff{Old:"Name", New:"", NewComputed:false, NewRemoved:true, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.2741428326.key":*terraform.ResourceAttrDiff{Old:"", New:"requester", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.2985144217.key":*terraform.ResourceAttrDiff{Old:"application", New:"application", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "launch_configuration":*terraform.ResourceAttrDiff{Old:"qa3-zookeeper-lc-dnymzh5q2bgancjhkfct2g7pgy", New:"kafka-qa3-qa-cchg-zookeeper-20180215214725802400000001", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.1765666997.propagate_at_launch":*terraform.ResourceAttrDiff{Old:"", New:"true", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.1821950404.value":*terraform.ResourceAttrDiff{Old:"qa3 Zookeeper", New:"", NewComputed:false, NewRemoved:true, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.1486810854.value":*terraform.ResourceAttrDiff{Old:"kafka-zk", New:"kafka-zk", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.3476914036.key":*terraform.ResourceAttrDiff{Old:"island", New:"island", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "vpc_zone_identifier.3068254804":*terraform.ResourceAttrDiff{Old:"", New:"subnet-9e171fc6", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.3476914036.propagate_at_launch":*terraform.ResourceAttrDiff{Old:"true", New:"true", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.3450674018.propagate_at_launch":*terraform.ResourceAttrDiff{Old:"true", New:"false", NewComputed:false, NewRemoved:true, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.214323007.value":*terraform.ResourceAttrDiff{Old:"", New:"", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.1765666997.key":*terraform.ResourceAttrDiff{Old:"", New:"provisioned-by", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.214323007.key":*terraform.ResourceAttrDiff{Old:"", New:"purpose", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "vpc_zone_identifier.172886254":*terraform.ResourceAttrDiff{Old:"subnet-769ae62f", New:"", NewComputed:false, NewRemoved:true, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.2605131061.value":*terraform.ResourceAttrDiff{Old:"", New:"kafka-qa3-qa-cchg-zookeeper", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.3476914036.value":*terraform.ResourceAttrDiff{Old:"qa", New:"qa", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "tag.3192484707.propagate_at_launch":*terraform.ResourceAttrDiff{Old:"", New:"true", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}}, Destroy:false, DestroyDeposed:false, DestroyTainted:false, Meta:map[string]interface {}(nil)}

@apparentlymart
Copy link
Contributor

Hi all!

This seems to be the same thing that we discussed over in #17263. Eventually the requester realized that using vpc_zone_identifier instead of availability_zones made the problem go away. I moved the issue over to the provider repository (as hashicorp/terraform-provider-aws#3439) to see if the AWS provider team can figure out what's going on here, but hopefully this could help you work around this weird bug in the mean time.

@igoratencompass
Copy link

@apparentlymart that doesn't work either, terraform ended up picking a random subnet from a different VPC which ends up with error:

Status Reason: Security group sg-xxxxxx and subnet subnet-yyyyyyy belong to different networks. Launching EC2 instance failed.

This is with terraform 0.11.3

Don't you guys have some kind of regression tests so basic things like this don't brake upon new releases? I saw posts reporting the same issue in 0.10 and 0.9 as well, how is it possible bugs like this to slip through for so long?

@igoratencompass
Copy link

Actually for that module I had commented out the vpc_zone_identifier option instead of availability_zones by mistake. Nothing strange when you have to suddenly go and modify every instance of aws_autoscaling_group in 20+ modules. The rest I said above re regression tests and QA still stands.

@ctaverne
Copy link

Hi,

Same issue here.
with 0.11.4

@jlucktay
Copy link

I have hit this error too, with Terraform v0.11.7.

There is a gist here with the details.

I was applying a plan containing only 3 resources:

  • 1x EC2
  • 1x extra EBS volume for the EC2
  • 1x volume attachment to the EC2

The EBS volume already existed and was not going to be destroyed, in the plan. It was only going to have some tags updated.

The EC2 and the volume attachment were planned to be destroyed and recreated, because I had made some changes to the user_data script for the EC2.

Please let me know if more context/detail is needed!

This was referenced Nov 3, 2018
@teamterraform
Copy link
Contributor

Hello!

Thanks for reporting this issue. Unfortunately the error output in this "diffs didn't match" situation is often not enough to diagnose the problem. Starting in 0.12 the situation that causes this error is more precisely reported, and the necessary debugging information is recorded in the logs. If this issue persists after upgrading Terraform, please file an issue with the referenced provider.

Thanks

@ghost
Copy link

ghost commented Sep 28, 2019

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 Sep 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests