How to "hook" into destroy command/event?

I’d like to be able to control the lifecycle of dependent infrastructure by integrating with Waypoint deploy/release/destroy commands. I’m familiar with hooks in Waypoint but there doesn’t seem to be an equivalent for “destroy.”

What’s the best way to accomplish having something like a script triggered when waypoint destroy is called?

Hey there @digitalsanctum ! From what I can tell, I don’t think there are hooks that support the destroy CLI command: Lifecycle: Hooks | Waypoint by HashiCorp Hooks look to be more about the lifecycle commands that are represented in a waypoint.hcl.

For now, I recommend opening a feature request for triggering scripts on destroy on GitHub so we can track it! Thanks :slight_smile:

1 Like

@briancain Thanks for the reply. I’ve opened a feature request here: Make "destroy" part of the lifecycle · Issue #1394 · hashicorp/waypoint · GitHub

1 Like