-
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
account for deposed in terraform show #22149
Conversation
Hmm... I thought we'd already fixed this but I guess that was for the plan rendering rather than for the state rendering. I believe in the plan we render each object separately rather than rolling up the deposed objects to just be a count in the header, since otherwise there's no way for the user to see the attributes of the deposed objects. For consistency, I'd lean towards making the output be shaped more like this, if that isn't a lot of extra work:
I don't remember if that's exactly how we annotated the deposed objects in the plan; if you can find that then my intent here was to output here in the same format. (There's an open issue somewhere else to explain better what "deposed" means, but we don't need to solve that here; we already have mentions like this in the UI, so this won't make it any worse.) As an aside... I had no idea there was a special case in |
I actually reduced the output to match the old count notation, but If we both agree that listing deposed instances completely is favorable, I'll go ahead and refactor this. |
We do still use the "(n deposed)" notation internally in the tests because it's mimicking the old test string generator for compatibility with the old tests, but since the deposed objects now have unique ids associated we started showing them explicitly and in full in the UI when relevant so that users would be able to correlate the deposed objects they see in different contexts. |
Updated the output to include all deposed objects individually, annotated as so:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple comments, LGTM!
each deposed instance. Prevent crash if the current instance is missing.
98713b8
to
345dfac
Compare
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. |
Account for deposed instances in show command.
Prevent crash if the current instance is missing.
Besides preventing the panic, this will also add
(N deposed)
to the resource address line, similar to other state outputs.Fixes #21770