https://pulumi.com logo
Title
b

brave-nightfall-19158

11/26/2021, 5:20 PM
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

billowy-army-68599

11/26/2021, 5:53 PM
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

brave-nightfall-19158

11/27/2021, 10:53 AM
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

billowy-army-68599

11/27/2021, 1:39 PM
@brave-nightfall-19158
pulumi stack delete
will only remove the single resource from your stack, not delete the whole thing
b

brave-nightfall-19158

11/27/2021, 5:16 PM
Ohhhh sorry. I didn't realise it's different! I'll check out docs for it. Thanks!