Is it possible to migrate a stack from one project...
# general
a
Is it possible to migrate a stack from one project to another? Would it just be
stack export
and
stack import
? Specifically I am using the S3 backend with namespaced stacks such as
<http://infastructure.operations.apps.QA|infastructure.operations.apps.QA>
and
<http://infrastructure.consul.apps.QA|infrastructure.consul.apps.QA>
I want to move the resources that are managed by the
operations
project to be owned by the
consul
project.
b
it's not quite that simple, but you could do: - remove code from operations project and remove the stuff from the state, so that pulumi no longer wants to destroy it - import it into the new consul project using the import flag
a
So I was able to export the stack state, modify the stack and project names in the resource URNs, then import the state into the new stack. After that when I ran an
up
it ran cleanly and then I did a force removal of the old stack and removed the old code.