Hello! I'm trying to move a resource from one stac...
# getting-started
d
Hello! I'm trying to move a resource from one stack to another, but it complains about the provider already existing, which it does. I'm not sure how to solve this:
Copy code
pulumi state move \
    --source nextgen/app/prod \
    --dest nextgen/scaleway-iam/prod \
    'urn:pulumi:prod::app::scaleway:account/project:Project::merlin-prod'
error: provider urn:pulumi:prod::scaleway-iam::pulumi:providers:scaleway::default_1_25_0_github_/api.github.com/pulumiverse already exists in destination stack
a
you may have better luck by deleting it from the state of the old stack and then importing it into the new stack
d
Thanks, is this it? https://www.pulumi.com/docs/iac/adopting-pulumi/import/ Do you know if a resource can exist in two stacks at the same time? For migration purposes
a
i haven't tested it, but i doubt pulumi enforces unique resources across stacks, so you should be able to import into the new stack before deleting (from the state only) from the old stack.
d
Great, thanks again!
That worked perfectly, thanks for the tip Devin!