I've been trying to read docs and blogs and whatno...
# general
b
I've been trying to read docs and blogs and whatnot - and I still can't seem to get my mind around this.. I know it's possible to change the name of a stack - and in the
--help
it even indicates that it's possible to change the organization\project\name of the stack (of course with local provider, doing so sends your stack faaar away into a dev/null mode and you have to fish out your backups ;)).. ..But can I just change the name of the project? Right now I've tried multiple projects to get my config just right, and I've got some infra provisioned that I'd prefer not to have to reprovision in a new project/stack (though that would be my next step) - but I'd really love to just change the project name.
My current thought on this is literally a search-and-replace in the state file for oldprojectname -> newprojectname (and then afterwards rename the stack with pulumi).
l
I guess just editing Pulumi.yaml wouldn't be particularly "clean", as all the resource URNs would still use the old stack name. You could export from the existing stack, import into a new empty stack in a new project, and then
pulumi stack rm
the old stack?
b
I'll try it out! I must say I don't really intuit the concept of projects (as far as I've understood it - it's the stacks proximity to a Pulumi.yaml file) so it does feel a bit weird. Definitely better than manually going through all the statefiles and updating all the resources with new names with search/replace 😉