IBM-Cloud / terraform-provider-ibm

https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs
Mozilla Public License 2.0
338 stars 662 forks source link

Classic VM is only really deleted some time after terraform destroy complete #610

Open l2fprod opened 5 years ago

l2fprod commented 5 years ago

Using this sample https://github.com/IBM-Cloud/LAMP-terraform-ibm, I did:

Then I did terraform destroy

Everything got destroyed but for a brief moment I could still connect to the VSI after terraform completed until it got really deleted:

image

I could also see the device in the UI console.

I would expect terraform returns only after the resources have been confirmed to be really deleted/unreachable

stevestrutt commented 5 years ago

@l2fprod that is the way that delete of a Classic VSI works. The delete request is async and IMS then cleans up the VSI's using a cron job run on a 20 minute schedule. This is the behaviour of the SL API. Hoping for better with the VPC apis.

l2fprod commented 5 years ago

Maybe this should be part of the provider documentation. I was really surprised I could still connect and thought the delete did not work.

Is it the same in VPC? Delete is also async there

hkantare commented 5 years ago

In VPC its not an async..The vm gets deleted when user run destroy.

l2fprod commented 5 years ago

@hkantare @davetropeano

you mean that for VPC the terraform provider is waiting for the VSI to actually disappear? As the delete process of a VSI in VPC is async too - VSI first goes to "Deleting" state before disappearing. Then why not doing the same for the classic VSI?

hkantare commented 2 years ago

@geethasathyamurthy can you please update this in compute VM instance documentation