https://pulumi.com logo
#general
Title
# general
w

worried-beach-30948

08/03/2023, 1:42 AM
howdy. This is documented on
pulumi stack rename -h
Copy code
Rename an existing stack.

Note: Because renaming a stack will change the value of `getStack()` inside a Pulumi program, if this
name is used as part of a resource's name, the next `pulumi up` will want to delete the old resource and
create a new copy. For now, if you don't want these changes to be applied, you should rename your stack
back to its previous name.
You can also rename the stack's project by passing a fully-qualified stack name as well. For example:
'robot-co/new-project-name/production'. However in order to update the stack again, you would also need
to update the name field of Pulumi.yaml, so the project names match.
however:
Copy code
$ pulumi stack rename Organization/newproject/stackname
error: stack names are limited to 100 characters and may only contain alphanumeric, hyphens, underscores, or periods: "Organization/newproject/stackname"
so, documentation is wrong, OR, pulumi is broken for renaming a stack with FQ. In my case am trying to rename the project Just thought I'd let someone know
l

little-cartoon-10569

08/03/2023, 2:25 AM
It works for me. Have you got an old version of the CLI? The feature is newish.
g

gifted-gigabyte-53859

08/03/2023, 3:12 AM
stack rename was broken a while ago https://pulumi-community.slack.com/archives/C84L4E3N1/p1684196243244059 not sure if a) your issue is related or b) if that issue has been fixed yet
w

worried-beach-30948

08/03/2023, 4:02 AM
Copy code
$ pulumi version
v3.76.1
l

little-cartoon-10569

08/03/2023, 4:30 AM
Any special characters in the new name? Maybe try quoting it in single quotes?
w

worried-beach-30948

08/03/2023, 5:31 AM
no special chars, If I quite, then there is still an issue with the doc though
haven't tried, elected to start fresh