Hi everyone, I hope someone can help guide me! I h...
# general
f
Hi everyone, I hope someone can help guide me! I have deployed some resources. I then refactored my code so those resources are now nested under a
ComponentResource
Is there a way to reimport these resources so that I don't have to delete and recreate them?
b
Hi @fierce-cat-91199 you may be able to read this blog post to help you use aliases https://www.pulumi.com/blog/cumundi-guest-post/
f
Thanks Paul I'll read this! 🙂
I've had a read and trying but it seems Pulumi still wants to delete and create again. Unless that's what it says, but it will just update the parent/child relationship?
what would the output of a
preview
look like when re-parenting?
I figured it out 🙂 Had to set
NoParent *=* true
then preview showed no changes. Did an
up
and checking
pulumi stack
the resources are successfully re-parented
Interestingly, setting
ParentUrn
to the URN of the root stack did not work. I would have thought that's the same as saying "no parent". Anyhow it's all working
l
Can you remove the alias stuff after the first migratory
pulumi up
? Or does it have to exist thereafter?