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

gray-electrician-97832

08/14/2023, 6:03 PM
I completely deleted one of my (several) AWS accounts. Pulumi still shows these stacks in the dashboard, and I don't see any way to delete them. Note this does NOT mean deleting the resources -- those are already gone. I simply want to remove those projects & stacks from Pulumi's dashboard. How can it be done?
f

fast-vr-6049

08/14/2023, 6:50 PM
It sounds like you just need to run `pulumi stack rm`: https://www.pulumi.com/docs/concepts/stack/#delete-a-stack
If
pulumi
is reporting that resources still exist but you're sure they're gone, then you'll need `pulumi state delete`: https://www.pulumi.com/docs/cli/commands/pulumi_state_delete/
g

gray-electrician-97832

08/14/2023, 7:27 PM
Neither of these work for me. If I try
pulumi stack rm ORGNAME/STACKNAME
, the CLI does what you'd expect and ends with
Stack STACKNAME has been removed!
but that stack still appears in the dashboard and hows 48 resources. I tried
pulumi stack --show-urns
so I could provide the urns to
pulumi stack delete
but got the message
No resources currently in this stack
.
f

fast-vr-6049

08/14/2023, 7:28 PM
For disambiguation, are the things sticking around
stacks
or
projects
? I've run into problems myself where I forget the difference.
Copy code
pulumi stack rm ORGNAME/PROJECTNAME/STACKNAME
g

gray-electrician-97832

08/14/2023, 7:31 PM
Good point. I do get a different response to
pulumi stack rm /ORGNAME/PROJECTNAME/STACKNAME
as opposed to
pulumi stack rm STACKNAME
or
pulumi stack rm ORGNAME/STACKNAME
-- now it's giving me options for pulumi destroy and so on.
That's interesting. When I do
pulumi stack select
and other basic operations, I usually include only STACKNAME. Not sure I understand why the result would be different. Can stack names be reused? I thought they were unique within the org.
f

fast-vr-6049

08/14/2023, 7:37 PM
I believe the difference is for when you're working on projects contained within a single Pulumi Cloud user versus a Pulumi Cloud Organization, but it's definitely an easily made mistake. I believe `ORGNAME`s must be unique across Pulumi Cloud, `PROJECTNAME`s unique within the Org, with `STACKNAME`s only unique within the project
g

gray-electrician-97832

08/14/2023, 7:37 PM
Thanks for the help.
pulumi stack rm --force
did what I needed.
2 Views