-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
prototype: migrate command for terraform stacks #36461
base: main
Are you sure you want to change the base?
Conversation
50223a0
to
a6794d7
Compare
a6794d7
to
f977c14
Compare
targetStackAddress := append(current.ConfigAddr(), stackaddrs.StackStep(ref)) | ||
stack := m.Migration.Config.Stack(targetStackAddress) | ||
|
||
// we have the configurations for the components in this stack, we just | ||
// need to scope them down to the components that are in the current | ||
// stack instance. | ||
|
||
for name := range stack.Components { | ||
configComponentAddress := stackaddrs.ConfigComponent{ |
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.
It doesn't hurt to leave the code here, but just to validate that my understanding is correct. I don't think this part is actually necessary, especially since we are keeping the tool to just root-level migration for now, i.e no migration into components embedded in child stacks, which is what a StackCall
would be
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.
yes, the mapping doesn't actually have a way of copying data into embedded stacks so this shouldn't ever be triggered
This PR adds a proof of concept for migrating state between Terraform workspaces and Terraform stacks.