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

core: change taint semantics #6600

Closed
wants to merge 3 commits into from
Closed

core: change taint semantics #6600

wants to merge 3 commits into from

Conversation

svanharmelen
Copy link
Contributor

Change tainted resources to act as a normal (first class citizens) resource. This means it’s shown correctly in a plan/diff and takes into account any actions that are dependant on the tainted resource and, vice verse, any actions that the tainted resource depends on.

So this changes the behaviour from saying this resource is tainted so just forget about it and make sure it gets deleted in the background, to saying I want that resource to be recreated (taking into account the
existing resource and it’s place in the graph).

An example of what this fixes is if you taint a resource (say an instance in a network) and then call terraform destroy. Before this would not work properly because both the instance and the network would be destroyed in parallel (so no deps taking into account). Now the graph will be correct and so the destroy will succeed properly.

Also it brings a little better UX:

Before:
image

After:
image

This change alters the state file layout, but I don't think a migration is needed. I noticed there is another version of the state being prepared, so I think this change should tag along on that change.

@svanharmelen
Copy link
Contributor Author

@mitchellh @phinze I noticed this one needs to be rebased again... But (again) it would be very nice if we can move this one along... Thx!

Sander van Harmelen added 3 commits May 23, 2016 11:45
This means it’s shown correctly in a plan and takes into account any
actions that are dependant on the tainted resource and, vice verse, any
actions that the tainted resource depends on.

So this changes the behaviour from saying this resource is tainted so
just forget about it and make sure it gets deleted in the background,
to saying I want that resource to be recreated (taking into account the
existing resource and it’s place in the graph).
@svanharmelen
Copy link
Contributor Author

@phinze @mitchellh just rebased and fixed the PR so it is merge-able again... I know you guys are busy, but I would really appreciate if we can move on (discuss/merge/whatever) with this one so I don't have to rebase and fix the PR for a 4th time 😉

Thx!

@phinze
Copy link
Contributor

phinze commented May 23, 2016

@svanharmelen Sorry for the delay! I will pick this up this week. 👍

@svanharmelen
Copy link
Contributor Author

That would be great... Thx!

@phinze
Copy link
Contributor

phinze commented May 27, 2016

This is great, @svanharmelen! I've done a top to bottom review of the code and also played with the behavior a bit locally. The user experience is much nicer with this change!!

Doing a final rebase and merge locally. 👍

@phinze
Copy link
Contributor

phinze commented May 27, 2016

Merged in #6894!

@svanharmelen
Copy link
Contributor Author

Thanks for the review and merge @phinze! 🎉

@ghost
Copy link

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

Successfully merging this pull request may close these issues.

None yet

3 participants