:question: Is there a correct way to completely re...
# aws
w
Is there a correct way to completely remove a stack from the S3 remote backend state? It looks like
pulumi stack rm
still leaves some configuration files behind
l
Which files? You shouldn't see the stack if you run
pulumi stack ls
.
w
There are configuration files on the remote state bucket from stacks that have been deleted
l
Presumably they're not in use. You can tidy them up.
w
But there’s no way to get pulumi to clean this up by itself?
l
I don't know. I don't have enough information. What files?
But: probably not.
pulumi stack rm
is the final word, as far as I know.
w
There’s a bunch of stuff in .pulumi, backups, meta.yaml, and stack info
I don’t know exactly, but it looks like some of these things clearly belong to a stack that was deleted
l
~/.pulumi is local, and different for everyone who uses the (shared!) stack. It can't be cleaned up. If you delete the stack, Pulumi can't turn on my machine and delete my metadata files.... even though I'd deployed the stack a few times.
w
it’s a .pulumi folder on the remote s3 bucket
l
That's local.
w
how is that local?
l
It's the ~/.pulumi for that instance. You have another ~/.pulumi in your instance, and the CI machine has one, and your other team members have one.. etc.
I don't me "here" local, I mean "specific to this instance" local.
w
I don’t understand what that means in the context of S3. It’s not local to anything running pulumi, it’s just a remote state repository
l
I'm not au fait with all the details, but that directory exists with different files for everyone who has used that project / state. It exists on my machine even though I don't use S3 as a backend, I use the Pulumi app. You'd need someone with more information to figure out if all the data that can be delete is being deleted. But generally: don't worry about the contents of ~/.pulumi, they're just implementation details.