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

ignore_changes causes keys in other flatmapped objects to be lost from diff #12897

Merged
merged 3 commits into from
Mar 21, 2017

Conversation

jbardin
Copy link
Member

@jbardin jbardin commented Mar 20, 2017

When transforming a diff from DestroyCreate to a simple update cause be
ignore_changes, we need to filter each flatmapped container as a whole
to ensure that unchanged keys aren't lost in the update.

Previously, unchanged fields in a list, set or map were being filtered out of the diff because they looked like empty, but because they are updated as a whole these fields would then be removed from the instance.

Fixes #9043

jbardin added 2 commits March 20, 2017 17:44
ignore_changes is causing changes in other flatmapped sets to be
filtered out incorrectly.

This required fixing the testDiffFn to create diffs which include the
old value, breaking one other test.
@jbardin jbardin force-pushed the jbardin/ignore-changes branch from 0cec6fe to f71fc1c Compare March 20, 2017 21:44
@jbardin jbardin requested a review from mitchellh March 20, 2017 21:48
When transforming a diff from DestroyCreate to a simple Update,
ignore_changes can cause keys from flatmapped objects to be filtered
form the diff. We need to filter each flatmapped container as a whole to
ensure that unchanged keys aren't lost in the update.
@jbardin jbardin force-pushed the jbardin/ignore-changes branch from f71fc1c to 0ae0076 Compare March 21, 2017 13:12
@jbardin
Copy link
Member Author

jbardin commented Mar 21, 2017

Just fixed up some comments with that last rebase.

@ghost
Copy link

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

All vpc_security_group_ids being removed when updating instance Security Groups
2 participants