Keep run logs around even after a stack is deleted
We use a merge-before-apply workflow and have found that the easiest way to remove a Terraform directory is to open 2 separate PRs:
First PR removes all the Terraform resource definitions but not the Terraform provider/state config
Second PR removes the remaining resources, and needs the Spacelift stack deleted before it can be merged (I think - I’m pretty sure disabling stacks causes Spacelift to send admin errors and won’t make the spacelift/proposed PR check ignore the stack)
It would be nice if deleting a stack did not delete the related run logs until they expire if you visit a run’s logs URL directly. This would pair nicely with the feature request to allow us to store logs longer and would make it easier to remove Terraform directories.
One more thing re: the second PR - it seems push policies don’t get access to the stack’s disabled property, so we can’t choose to ignore runs for a disabled stack. Instead I get an admin notification that the run couldn’t start and an PR check with an error appears on the triggering commit.
- Problem
Log in to comment and vote
Comments1
Natalia Gazda
Aug 1, 2025
Hey @Evan Strat, thanks for submitting that! I looked at it with one of our engineers, but I’m afraid what you’re asking is not trivial. We don’t currently allow viewing deleting stacks, and that would be a major UI/UX change. We do have planned a redesign of stack deletion flow, and we could probably look into that then, but it’s not a high prio, so I don’t have an ETA yet. I’ll leave it to gathering votes in the mean time, to see if there are more people interested.