Open l2fprod opened 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.
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
In VPC its not an async..The vm gets deleted when user run destroy.
@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?
@geethasathyamurthy can you please update this in compute VM instance documentation
Using this sample https://github.com/IBM-Cloud/LAMP-terraform-ibm, I did:
terraform init
,terraform apply
.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:
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