terraform-provider-spotinst
terraform-provider-spotinst copied to clipboard
Unable to delete security groups because of dangling ENIs
After provisioning ocean cluster and setting up a few pods inside it. Upon destroying resources using terraform I'm always stuck at deleting the worker security groups because of dangling ENIs.
@imranismail you can configure network interfaces to be deleted by using the delete_on_termination
attribute in the network_interface
block, e.g.:
network_interface {
device_index = 0
description = "<Your Description>."
delete_on_termination = true
associate_public_ip_address = true
}
Please refer to the docs for further information.
@CarlosDomingues That is for elastigroup. For ocean I don't see any option to configure this.
Hi @imranismail, thanks for your comment. We've been looking into it and tried to reproduce it using the eks_ocean.tf template we offer in our documentation. On our end, it seems like everything is working properly. Would you be able to contact Spotinst support and provide them with your template in order for them to look into the issue?
@danielle-297 did you try launching a few services inside the cluster? That's when the ENIs get created.
It's worth noting that when deleting an EKS cluster you must delete your "LoadBalancer" service types first. EKS does not clean this up for you at the time of this writing.