Destroy
Warning
This content is part of the legacy version of Waypoint that is no longer actively maintained. For additional information on the new vision of Waypoint, check out this blog post and the HCP Waypoint documentation.
https://pkg.go.dev/github.com/hashicorp/waypoint-plugin-sdk/component#Destroyer
The Destroyer
interface is responsible for removing any resources which have been created by the waypoint deploy
and release
phase.
Destroy can only be implemented in Platform
and ReleaseManager
components and is implemented through the following interface.
DestroyFunc
requires you return a function, like other interface functions Waypoint will automatically inject any of the
standard parameters. In addition you can specify the output value returned from the DeployFunc
, or from ReleaseFunc
,
the details of which you can use to clean up any deployments. As shown in the example below, the function signature for
a DestroyFunc
function only has a single output parameter which is an error used to signal if the destroy operation succeeded.