-
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
Fix state mv
with nested modules to work properly
#8304
Conversation
Updated PR, also fixes #7797 now. |
return result | ||
|
||
case *terraform.ResourceState: | ||
// If a module state then we should add the full list of modules |
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.
Bad comment here I think.
LGTM generally! Two nits inline. |
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. |
Fixes #8263
Fixes #7797
We were only adding the first result of searching for what to move. This works for every result type except modules since nested modules aren't nested within the ModuleState but alongside each other with longer paths. Rather than do a BIG refactor on nesting module states (which probably isn't right anyways), I modified
State.Add
andStateMvCommand
to understand this limitation.