how do i delete and/or destroy stacks (projects?) ...
# getting-started
k
how do i delete and/or destroy stacks (projects?) of I use automation api to create them? I've been advise I should be able to use some commands via CLI if I pass the stack url, but
pulumi destroy --stack beautynew/gcp-pubsub-new/devnew
ir failing saying
error: could not get cloud url: could not load current project: expected an object
. Thanks!
e
Oh yeh that’s probably a new bug. We don’t really need a project for destroy at the moment because we don’t actually run the program for it, so we added a trick to just return an empty project if we couldn’t find a Pulumi.yaml. But now the project loader validates that Pulumi.yaml has the expected shape, and empty is not valid. Probably an easy fix, if you roll back a couple of versions it should work for now and I’ll see about getting a fix in for this in time for the next release.
Also might be worth checking that you don’t have an empty Pulumi.yaml around. That would trigger this
Actually going and checking the code for this I think it can only be triggered by an empty Pulumi.yaml, our “empty project” is created post-validation.
k
Thanks Fraser! I indeed had an empty Pulumi.yaml lying around. Now I am able to get the
pulumi destroy
as well as
pulumi stack rm
. Thanks a ton!!