in case anyone else needs to do this, I tried-and-failed my way into finding a working solution:
Copy code
pulumi config cp -C [directory of original project] -s [fully qualified stack name in original project] -d [fully qualified stack name in new project]
(fully qualified stack name being
org/project/stack
)
ancient-car-89914
07/04/2022, 5:12 PM
this will overwrite the stack’s config file in the original project with a new version which has been encrypted for the new project/stack, which you can copy to the new project directory and then git checkout to revert the original config file
ancient-car-89914
07/04/2022, 5:12 PM
seems a slightly weird/backward way of doing it, but nothing else I tried worked
ancient-car-89914
07/04/2022, 8:06 PM
update: seems like the above command will leave your new project using the secrets provider from the old project, which seems like a bad idea and actually caused an issue for me when I later renamed the new project - looks like this can be fixed/avoided by running this immediately after copying the config:
No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.