When using preview environments, the initialDeployHook allows me to set up services or data that I need for the preview environment. Sometimes, however, I would like to tear this down along with the preview environment.
It's possible to coordinate this with my service's start script, but it would be convenient to be able to define this at the level of the preview environment itself.
As an example, imagine I'm integrating with a third-party analytics tool. I might want to create a custom workspace in that tool just for my preview environment, so will send an API call like "POST https://analytics.example.com/workspace?name=pr1234" during my initialDeployHook. When the preview environment is getting deleted, I would like to clean up the workspace with a "DELETE https://analytics.example.com/workspaces/pr1234".
It would be nice to be able to specify something like a "teardownHook" that is similar to the existing "initialDeployHook".