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 creating an instance with a remote-exec script, sometimes the script hangs and it's obvious that it's not going to work. For example, maybe I forgot -y on an apt-get install. When you hit 'ctrl-c' in terraform, it prints Interrupt received. Gracefully shutting down... but then it will never exit. So, I either have to kill the process by hitting ctrl-c again which means it never syncs to the tfstate file so I have to delete the orphaned ec2 instance(s) manually, or I have to just wait until the timeout.
I think it would be better if terraform would kill the remote-exec script immediately on ctrl-c, and then it could gracefully clean up by adding the tainted ec2 instances to the tfstate file and exit.
The text was updated successfully, but these errors were encountered:
I am seeing same behavior when using Openstack as provider. running terraform version: 0.7.2
to reproduce:
Prepare your instance.tf file for Openstack provider, you can use this below and feel free to change image to anything you want same for some others parameters:
Experiencing this with Azure VMs as well, it slows down our workflow since the timeouts are lengthy and having to manually destroy the resources on Azure is tedious.
Terraform Version
0.6.15
Affected Resource(s)
Terraform Configuration Files
Any remote-exec script
When creating an instance with a remote-exec script, sometimes the script hangs and it's obvious that it's not going to work. For example, maybe I forgot -y on an apt-get install. When you hit 'ctrl-c' in terraform, it prints
Interrupt received. Gracefully shutting down...
but then it will never exit. So, I either have to kill the process by hitting ctrl-c again which means it never syncs to the tfstate file so I have to delete the orphaned ec2 instance(s) manually, or I have to just wait until the timeout.I think it would be better if terraform would kill the remote-exec script immediately on ctrl-c, and then it could gracefully clean up by adding the tainted ec2 instances to the tfstate file and exit.
The text was updated successfully, but these errors were encountered: