Skip to main content

Delete resources without delete stack

Currently the only way to delete stack resources from UI is to run stack deletion from under settings. But we would like to keep the stack sometimes (for example we have stacks that get deployed only when needed).

We are currently working around this by running terraform destroy from task, but would love a way to just do this from the UI.

Workaround
Yes
Problem
Status: ⬆️ Gathering votes6 comments

Log in to comment and vote

Comments6

  • Azure Chipmunk

    •

    Jul 6

    running terraform destroy from task

    That’s probably the simplest/easiest way to do it.

    Alternatively, what I usually do is run a regular tracked run, but with the following runtime config override:

    environment:
      TF_CLI_ARGS_plan: -destroy

    That way, it’s in the list of regular tracked runs, and allows for policy evaluation, user confirmation, etc. That’s effectively what the “delete stack” destroy runs do, if I understand it correctly.

  • Black Breeze

    •

    Jan 21

    Thanks for raising this @Tony Wu . I see your point, but I’m also afraid that this is a sort of double-edged sword. I’m not sure if we’re improving the UX or trading minor convenience (the ability to avoid the task) for another sharp edge that someone one day will get hurt by.

    Please let me open this up to community voting. I don’t have an opinion here, so vox populi, vox dei.

    • Aquamarine Oak

      •

      Jan 21

      Sounds good.

      Just curious, what sort of double-edged sword scenarios do you have in mind? In my opinion the added functionality is one step away from full removal, and the worse case scenario is user would have to manually remove stack afterwards if that was the intention.