You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I searched a bit and recall that I wanted to see this some time back however I'm not sure I'm searching for the right thing. This is similar to #8144 I believe, except a little more directed.
Similar to the use case mentioned (used to deprovision hosts from Chef), I would like custom defined destroy actions that follow the remote-exec or local-exec style provisioners.
Essentially when Terraform runs it's destroy operation, not all things are cleaned up. For instance, I have no way to trigger a re-invocation of a null_resource executing a consul client in a docker container who's runtime just changed. Terraform correctly re-creates it, but it is up to me to taint the related null_resource to then run apply so it runs again.
Other things are like that of locally created files. I have a lot of local path setup running that upon destroy I don't want Terraform leaving around. I'd like some "on destroy" actions where I can define steps to perform further cleanup operations.
The text was updated successfully, but these errors were encountered:
"destroy provisioners" are a new feature that will be coming in the 0.9 release.
There will be 2 new options in the lifecycle, when to declare when the provisioner runs, and on_failure to determine how to handle provisioner failure.
when = "create"|"destroy"
on_failure = "continue"|"fail"
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
ghost
locked and limited conversation to collaborators
Apr 16, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Greetings,
I searched a bit and recall that I wanted to see this some time back however I'm not sure I'm searching for the right thing. This is similar to #8144 I believe, except a little more directed.
Similar to the use case mentioned (used to deprovision hosts from Chef), I would like custom defined destroy actions that follow the
remote-exec
orlocal-exec
style provisioners.Essentially when Terraform runs it's destroy operation, not all things are cleaned up. For instance, I have no way to trigger a re-invocation of a
null_resource
executing a consul client in a docker container who's runtime just changed. Terraform correctly re-creates it, but it is up to me to taint the relatednull_resource
to then run apply so it runs again.Other things are like that of locally created files. I have a lot of local path setup running that upon destroy I don't want Terraform leaving around. I'd like some "on destroy" actions where I can define steps to perform further cleanup operations.
The text was updated successfully, but these errors were encountered: