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
When using create_before_destroy lifecycle hook, it appears that remote-exec provisioners are not called. Here's the pattern I'm trying to adapt (due to Equinix Metal not having a shutdown script function):
A new metal_device is brought up
A new null_resource is brought up to house the triggers
The deposed null_resource is destroyed, executing the remote-exec which ensures that the node leaves the consul pool
arbourd
changed the title
Deposed resources do not called when = destroy provisioners
Deposed resources do not call when = destroy provisioners
Jun 17, 2022
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.
When using
create_before_destroy
lifecycle hook, it appears thatremote-exec
provisioners are not called. Here's the pattern I'm trying to adapt (due to Equinix Metal not having a shutdown script function):metal_device
is brought upnull_resource
is brought up to house the triggersnull_resource
is destroyed, executing theremote-exec
which ensures that the node leaves the consul poolmetal_device
is destroyedTerraform Version
Terraform Configuration Files
Debug Output
Nothing of immediately value popped up here.
Expected Behavior
The
remote-exec
script should run.Actual Behavior
The
remote-exec
does not run.There is no indication that the SSH script ran. Removing the lifecycle shows that it does:
Steps to Reproduce
remote-exec
provision is also using the lifecycle hook.Additional Context
Running in Terraform Cloud
The text was updated successfully, but these errors were encountered: