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

apply does not report "destroyed" resources when changing count #1938

Closed
radeksimko opened this issue May 12, 2015 · 5 comments · Fixed by #2506
Closed

apply does not report "destroyed" resources when changing count #1938

radeksimko opened this issue May 12, 2015 · 5 comments · Fixed by #2506
Assignees

Comments

@radeksimko
Copy link
Member

Take the following simple code:

resource "aws_instance" "foo" {
  count = 2
  ami = "ami-69447259"
  instance_type = "t2.micro"
}

and change count to 0, run terraform apply:

aws_instance.foo.1: Refreshing state... (ID: i-aaaabbb)
aws_instance.foo: Refreshing state... (ID: i-ccccddd)
aws_instance.foo: Destroying...
aws_instance.foo.1: Destroying...

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

Except it omits zero from the first instance resource ID, it says "0 destroyed", whereas expected output here would be "2 destroyed".

@mitchellh
Copy link
Contributor

That's odd. I'll take a look!

@dwradcliffe
Copy link
Contributor

From my tests, it does not report ANY destroyed resources. (more than just count changes)

aws_security_group.david-testing-sg: Destroying...

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

@chiefy
Copy link

chiefy commented May 27, 2015

👍 been noticing this too.

@mitchellh
Copy link
Contributor

Reproduced. Looking!

@ghost
Copy link

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

Successfully merging a pull request may close this issue.

4 participants