# How to "hook" into destroy command/event?

**URL:** <https://discuss.hashicorp.com/t/how-to-hook-into-destroy-command-event/23793>\
**Category:** Waypoint\
**Created:** [April 28, 2021, 7:34pm UTC](https://discuss.hashicorp.com/t/how-to-hook-into-destroy-command-event/23793 "2021-04-28T19:34:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![digitalsanctum](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/digitalsanctum/32/11050_2.png) [@digitalsanctum](https://discuss.hashicorp.com/u/digitalsanctum)\
**Post date:** [April 28, 2021, 7:34pm UTC](https://discuss.hashicorp.com/t/how-to-hook-into-destroy-command-event/23793/1 "2021-04-28T19:34:44Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![briancain](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/briancain/32/14082_2.png) [@briancain](https://discuss.hashicorp.com/u/briancain)\
**Post date:** [April 28, 2021, 9:44pm UTC](https://discuss.hashicorp.com/t/how-to-hook-into-destroy-command-event/23793/2 "2021-04-28T21:44:42Z")

</div>

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](https://www.waypointproject.io/docs/lifecycle/hooks#hooks) 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 🙂

---

<div class="post-metadata">

**Author:** ![digitalsanctum](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/digitalsanctum/32/11050_2.png) [@digitalsanctum](https://discuss.hashicorp.com/u/digitalsanctum)\
**Post date:** [April 28, 2021, 10:00pm UTC](https://discuss.hashicorp.com/t/how-to-hook-into-destroy-command-event/23793/3 "2021-04-28T22:00:07Z")

</div>

@briancain Thanks for the reply. I’ve opened a feature request here: [Make "destroy" part of the lifecycle · Issue #1394 · hashicorp/waypoint · GitHub](https://github.com/hashicorp/waypoint/issues/1394)
