https://pulumi.com logo
#getting-started
Title
# getting-started
c

careful-vegetable-11632

09/04/2023, 1:39 PM
Hi All. I have created a ECS service using Pulumi. The project I am working on is now growing, and I would like to create a second service, within the same VPC. Since the services are going to share infra, I think that the best way to organize things is to move all the shared infra to an new infrastructure repo / stack. How can I move infrastructure between Pulumi stacks without destroying and re-creating the infra (I don't want to disturb my production system). Thanks!
From looking at the docs, it seems that moving infra between stacks is possible, but complicated. I am going to try to create a new VPC in a infra_base stack and then update my service to use the new VPC. Hopefully this approach will work
s

salmon-account-74572

09/05/2023, 3:36 PM
Yeah, moving infrastructure between stacks isn’t as smooth of a process as we’d like it to be. You can try a combination of
pulumi import
(to import stuff into a new stack) and
pulumi state delete
(to remove it from the old stack), if you’d like.