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

Missing aws_autoscaling_group.termination_policies cause changes on each apply #936

Closed
radeksimko opened this issue Feb 5, 2015 · 5 comments

Comments

@radeksimko
Copy link
Member

If you don't define termination_policies within an aws_autoscaling_group, Terraform always detects a change.

provider "aws" {
  region = "eu-west-1"
}

resource "aws_vpc" "default" {
  cidr_block = "10.12.0.0/16"
}

resource "aws_subnet" "private" {
  availability_zone = "eu-west-1a"
  cidr_block = "10.12.0.0/24"
  vpc_id = "${aws_vpc.default.id}"
}

resource "aws_security_group" "sample" {
  description = "Sample sg"
  vpc_id = "${aws_vpc.default.id}"
  name = "sample"
}

resource "aws_launch_configuration" "sample" {
  name = "sample"
  image_id = "ami-8f0087f8"
  instance_type = "t2.small"
  associate_public_ip_address = false
  key_name = "coreos-test"
  security_groups = ["${aws_security_group.sample.id}"]
}

resource "aws_autoscaling_group" "sample" {
  name = "sample"
  availability_zones = ["eu-west-1a"]
  launch_configuration = "${aws_launch_configuration.sample.name}"
  min_size = 1
  max_size = 3
  desired_capacity = 1
  vpc_zone_identifier = ["${aws_subnet.private.id}"]
}

No matter how many times you run terraform apply, you'll always see following:

aws_autoscaling_group.sample: Refreshing state... (ID: sample)
aws_autoscaling_group.sample: Modifying...
  termination_policies.#: "" => "<computed>"
aws_autoscaling_group.sample: Modifications complete

Apply complete! Resources: 0 added, 1 changed, 0 destroyed.

I think that if no termination_policies option is given, it should automatically use Default, there's AFAIK nothing to "compute"?

@radeksimko
Copy link
Member Author

I reckon that this will help making it happen :)
mitchellh/goamz#218

@phinze
Copy link
Contributor

phinze commented Feb 5, 2015

Yup #923 will fix once merged 😀

@radeksimko
Copy link
Member Author

Ah, I've just noticed, this is probably going to be a duplicate in favour of #923 so I'm closing this one.

@radeksimko
Copy link
Member Author

well, silly things happen when I forget what I read/said before just a few comments above... ignore what I just said. I'll keep it closed anyway as it's now linked.

@ghost
Copy link

ghost commented May 4, 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 May 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants