-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
ignore_changes doesn't seem to work #3555
Comments
I'm seeing a similar issue with regards to tags. We use Ansible to configure our ec2 instances. Ansible targets the correct new hosts (we dont want to touch the previously configured hosts) by the presence of a tag. I'd like Terraform to be able to initially create a tag on an ec2 instance, let Ansible remove the tag, and then have Terraform ignore the tag when it's not longer present. |
I'm not seeing it destroy as I haven't tested it but what I have in my tf is
Then I get the following in plan
The final line is
Without the ignore option in lifecycle I got the same 7 destroy. It makes me thinks that even though its an update, terraform will still destroy that instance. |
I am seeing the same behavior as well. This bug is made all the more frustrating by the limitations of #3874. |
To confirm if this was a regression, and to see if I could work around this bug, I downloaded an older version of Terraform to run some tests:
I can confirm this appears to be a regression -
What is interesting?
I will go back one more release and retest.. |
v0.6.4 seemed to have the same issue. v0.6.3 is where things got interesting again:
|
We removed the |
Same here. Thanks to
|
I can report that |
Thanks for following up, @scalp42! I'm going to close this issue as fixed in master (and therefore will be fixed in the next 0.6.12 release)- anybody else on the thread still having issues on master feel free to follow up. 👌 |
I'm on 0.6.14 and I still seem to have this issue where Terraform wants to destroy instances despite having |
I'm having the same issue in 0.8.1
|
Works correctly on Terraform v0.9.8 using same config as @onlyanegg |
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. |
Follow up from #2525
It seems that the new ignore_changes feature is not working. I've tried adding ignore changes to an aws instance like this:
And when the ami has changed, I see the normal destroy/create diff like I would have in previous versions, except that the line of text for
ami
is missing. So it seems that it's removing ami from the visual diff but not the diff that determines what terraform will do.The text was updated successfully, but these errors were encountered: