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

command/format: restore "(forces new resource)" caption #16067

Merged
merged 1 commit into from
Sep 11, 2017

Conversation

apparentlymart
Copy link
Contributor

In 3ea1592 the plan rendering was refactored to add an extra indirection of producing a display-oriented plan object first and then rendering from that object.

There was a logic error while adapting the existing plan rendering code to use the new display-oriented object: the core InstanceDiff object sets the Destroy flag (a boolean) for both DiffDestroy and DiffDestroyCreate, and so this code previously checked r.Destroy to recognize the "destroy-create" case. This was incorrectly adapted to a check for the display action being DiffDestroy, when it should actually have been DiffDestroyCreate.

The effect of this bug was to cause the "(forces new resource)" annotations to not be displayed on attributes, though the resource-level information still correctly reflected that a new resource was required.

This fix restores the attribute-level annotations, which closes #16035.

In 3ea1592 the plan rendering was refactored to add an extra indirection
of producing a display-oriented plan object first and then rendering from
that object.

There was a logic error while adapting the existing plan rendering code
to use the new display-oriented object: the core InstanceDiff object sets
the "Destroy" flag (a boolean) for both DiffDestroy and DiffDestroyCreate,
and so this code previously checked r.Destroy to recognize the
"destroy-create" case. This was incorrectly adapted to a check for the
display action being DiffDestroy, when it should actually have been
DiffDestroyCreate.

The effect of this bug was to cause the "(forces new resource)"
annotations to not be displayed on attributes, though the resource-level
information still correctly reflected that a new resource was required.

This fix restores the attribute-level annotations.
@apparentlymart apparentlymart merged commit fe4cfd0 into master Sep 11, 2017
@apparentlymart apparentlymart deleted the b-plan-forces-new branch February 5, 2018 19:18
@ghost
Copy link

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

plan with 0.10.4 doesn't show (forces new resource) when a resource is recreated
2 participants