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

wet-noon-14291

01/13/2022, 12:40 PM
How do I rename a stack if I don't have access to the actual stack (it is part of an automation project). Running
pulumi stack rename <new-name> -s <old-name>
doesn't work. Output from this is: error: no Pulumi project found in the current working directory. If you're using the
--stack
flag, make sure to pass the fully qualified name (org/project/stack) Do I have to be in a project directory to rename a stack?
f

full-sugar-56177

01/13/2022, 1:35 PM
I had a similar issue and then I found this inside the "settings" tab of my stack. I guess the same applies to
pulumi stack rename
command. Perhaps there is a more convenient but I don't know it: Recovering Configuration Deleting this stack or this stack's resources requires that you have a
Pulumi.yaml
file in the same directory. If you no longer have access to the Pulumi program's source code, you can recreate the configuration files with the following commands:
Copy code
# Pulumi.yaml
echo "name: project-name" > Pulumi.yaml
echo "runtime: nodejs" >> Pulumi.yaml

# Pulumi.stack-name.yaml
pulumi stack select org-name/project-name/stack-name
pulumi config refresh
👍 1
30 Views