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

steep-island-39848

07/11/2022, 3:46 PM
Hi, I am using the automation API and to test certain workflows that use infrastructure that’s managed by Pulumi I’d like to run tests in one stack per test each. That works, but now I am accumulating empty stacks. Is there a way to remove a stack programmatically, i.e. other than through
pulumi stack rm
?
stack.Destroy()
only removes resources, but keeps the stack itself.
q

quiet-laptop-13439

07/11/2022, 3:51 PM
stack.Workspace().RemoveStack()
maybe?
1
👀 1
w

worried-rain-74420

07/11/2022, 4:22 PM
Unrelated to the Automation API, earlier today I noticed there’s no CLI flag for that behavior. Over the weekend that feature was also requested as part of the GH Action. https://github.com/pulumi/actions/issues/681
s

steep-island-39848

07/11/2022, 4:55 PM
Simas your suggestion worked, thank you! 🙏
👍 1
6 Views