hey y'all question regarding stack export - is thi...
# general
b
hey y'all question regarding stack export - is this file the full state of the entire of the infrastructure or is there something else hidden in Pulumi backend? The reason I ask - I want to move a resource from one stack to another but it would cause downtime which I want to avoid. Can I just export the stack, cut the resource + any dependencies and add into the stack file of my other stack, then reimport both? It's necessary as I'm refactoring the code and unfortunately put a resource where it shouldn't be 😅
b
there's nothing hidden. an easier way to do this is: delete the resource from your first stack, using
pulumi stack delete
copy the code into your new stack, and add the
import
property
b
Hey @billowy-army-68599 thanks! Unfortunately I can’t delete the whole stack and it’s just a single resource in there I want to move to another stack. Thanks for the info!
b
@brave-nightfall-19158
pulumi stack delete
will only remove the single resource from your stack, not delete the whole thing
b
Ohhhh sorry. I didn't realise it's different! I'll check out docs for it. Thanks!