During a refactoring I implemented a few higher-or...
# general
During a refactoring I implemented a few higher-order components that group some AWS primitives which were part of my main custom component before. So imagine I had the custom component `A `with subordinated components
. Now I implemented two components called
which now have
as subordinated components respectively and those two components have the parent
. When running
pulumi up
the preview shows that this would cause Pulumi to tear down
and create them new under
. Since those primitives represent important production infrastructure this would cause a brief service disruption for end users which I would like to avoid. Is there a way to tell Pulumi to just move the components without actually modifying the underlying infrastructure?
👍 1
This is https://github.com/pulumi/pulumi/issues/458 and we have a WIP solution for this in https://github.com/pulumi/pulumi/pull/2404. Landing this is very important for allowing this sort of flexible refactoring without risk of impact on production infrastructure. Feedback on the proposal in that issue would be appreciated. If you do need to work around this in the meantime, you can technically do so by hand editing the checkpoint (
pulumi stack export > stack.son
, edit,
pulumi stack import < stack.json
) to change the names of existing resources to the new names that will be used as part of our new components. This of course isn't a scalable solution, hence the issue and PR above, but could unblock if needed before that lands.
Ahh I see. I think adjusting the parent in the stack file should suffice for now. It is a bit tedious but should get the job done. Looking forward to
though 😉 Thanks for you quick and exhaustive reply, @white-balloon-205! (As always)