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 obey plan #3158

Closed
dwradcliffe opened this issue Sep 2, 2015 · 5 comments
Closed

Apply does not obey plan #3158

dwradcliffe opened this issue Sep 2, 2015 · 5 comments

Comments

@dwradcliffe
Copy link
Contributor

I've been able to reproduce a situation where an apply action does not obey the saved plan. The console output never mentions the extra attribute it changed, but I have cloudtrail logs showing the change.

Situation:
I have an AWS instance, and I'm attempting to change the tags. My plan shows that the tag is the only change that will be performed:

~ aws_instance.my-instance.0
    tags.testing: "david" => "david1"

Plan: 0 to add, 1 to change, 0 to destroy.

I've saved the plan and ran apply using the saved plan:

aws_instance.my-instance.0: Modifying...
  tags.testing: "david" => "david1"
aws_instance.my-instance.0: Modifications complete

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

But now the instance has Source/dest. check set to True, where it was False before running apply.

cloudtrail management console 2015-09-02 15-59-59

cloudtrail management console 2015-09-02 16-09-35

I'm not sure if this is limited to this resource/attribute or if this is a bigger problem. Either way, it's a pretty big problem.

Note: This was brought to light via another bug with the source_dest_check attribute, but the fact remains, apply should obey the plan and correctly display the changes it is making.

@mitchellh @catsby @phinze @radeksimko

@thegedge
Copy link
Contributor

Perhaps this is caused by the lack of ad.HasChange("source_dest_check") here?

@phinze
Copy link
Contributor

phinze commented Sep 16, 2015

Guessing this has something to do with the default being true for that field. Marked as a core bug and we'll definitely get this looked at before the next release for sure.

@mafonso
Copy link

mafonso commented Oct 1, 2015

Adding some more detail as I ran into this issue recently.
Turns out that this only shows when applying plan from Atlas terraform Terraform v0.6.4-dev (25bba596765417c65a6afb882a53b065b24ad882+CHANGES)
Both plan and apply mention source_dest_check: "" => "0" but in the end the eni is left with a value of true.
But when running plan with 0.6.3 against the same state afterwards it suggests a change
~ module.network.aws_instance.nat source_dest_check: "1" => "0" and an apply will actually make it to the eni.

@catsby
Copy link
Contributor

catsby commented Oct 8, 2015

Thanks for the additional information @mafonso – I believe this issue is resolved in the current master:

Terraform v0.6.4-dev (94db2fce3de658a1b902dc4dfebd8586c65ff28f+CHANGES)

I can't reproduce it as described. I believe the bug was introduced after v0.6.3 but fixed in this PR

Sorry for the trouble. If you can still reproduce this on master please let me know.
Thanks!

@catsby catsby closed this as completed Oct 8, 2015
@ghost
Copy link

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

5 participants