Not removing EBS volumes

249 views
Skip to first unread message

Monosij Dutta-Roy

unread,
Dec 7, 2019, 2:55:34 PM12/7/19
to Terraform

Using TF 0.12.17 and this issue has been ongoing now for a few versions

In doing some tutorials using Jenkins and ec2 instances with EBS volumes - a terraform destroy times out on gateway destruction giving the message:

Error waiting for Volume (vol-025b4660192abfe4c) to detach from Instance: i-07c848346e68463e0

The EBS volume takes some time to remove from console - so after I terminate the EC2 instance with the EBS volume - only then tf destroy can be run again to completion.

To elaborate - not sure if it is an AWS issue or tf issue as force detach volume from console does not work either and I have to destroy the ec2 instance.

Please note I am doing this based on tutorials that have been vetted out and am creating EC2 instances with Ubuntu 19.04 if that helps.

Hope this can be fixed soon or perhaps there is something I am missing?

Thank you.

Fernando 🐼

unread,
Dec 7, 2019, 5:50:53 PM12/7/19
to terrafo...@googlegroups.com
How are you attaching the EBS volume to begin with? 
It it part of the launch template? 
It is an existing EBS or blank one? 
Does it have a terminate flag? 

--
Fernando 🐼

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/hashicorp/terraform/issues
IRC: #terraform-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Terraform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to terraform-too...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/4ce0c759-0334-4334-a5d3-b67a3ff1858b%40googlegroups.com.

Orlando Pereira

unread,
Dec 16, 2019, 2:47:22 AM12/16/19
to Terraform

I don't have enough information to diagnose the issue, I wonder if you can provide me with the following information?


1) I wonder if I can see the tutorial you are using?

2) has the CI user permissions to delete resources?

3) what backend are you using for your states?

4) where you have the terraform files ?


Reply all
Reply to author
Forward
0 new messages