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

create_before_destroy causes apply summary to be incorrect #6327

Closed
clstokes opened this issue Apr 25, 2016 · 3 comments · Fixed by #9731
Closed

create_before_destroy causes apply summary to be incorrect #6327

clstokes opened this issue Apr 25, 2016 · 3 comments · Fixed by #9731
Assignees

Comments

@clstokes
Copy link
Contributor

If I change a Terraform resource that causes the resource to be recreated (e.g. (forces new resource)), the value of create_before_destroy will alter the apply summary causing it to match the plan summary or causing it to not match. Specifically, create_before_destroy = true will mask the destroyed resource from being counted for the apply summary.

With create_before_destroy = false

Plan and apply match:

Plan: 1 to add, 0 to change, 1 to destroy.
Apply complete! Resources: 1 added, 0 changed, 1 destroyed.

With create_before_destroy = true

Plan and apply do not match:

Plan: 1 to add, 0 to change, 1 to destroy.
Apply complete! Resources: 1 added, 0 changed, 0 destroyed.

Gist with config and sample logs - https://gist.github.com/clstokes/4f634769f0647b6c1e2f04bcc78c8b91.

@mitchellh
Copy link
Contributor

Reproduced, thanks for the easy steps.

@mitchellh mitchellh self-assigned this Oct 30, 2016
mitchellh added a commit that referenced this issue Oct 30, 2016
Fixes #6327

Deposed instances weren't calling PostApply which was causing the counts
for what happened during `apply` to be wrong. This was a simple fix to
ensure we call that hook.
@mitchellh
Copy link
Contributor

Have a fix in referenced PR.

gusmat pushed a commit to gusmat/terraform that referenced this issue Dec 6, 2016
Fixes hashicorp#6327

Deposed instances weren't calling PostApply which was causing the counts
for what happened during `apply` to be wrong. This was a simple fix to
ensure we call that hook.
@ghost
Copy link

ghost commented Apr 20, 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 20, 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.

3 participants