The network interface can’t be deleted; Network interface is currently in use.

Shi
CI/CD/DevOps
Published in
1 min readFeb 10, 2022

this post saved my day: https://stackoverflow.com/questions/37232965/issue-when-trying-to-delete-vpc-and-network-interface

I used terraform to deploy some infra including a VPC, EKS and RDS; and when I tried to run terrafrom destroy , it times out and the VPC is lingering there; so I tried to login to aws console and tried to delete the VPC manually, it complaint that the network interface attached to it are still there, so I need to delete the network interface first.

so I selected the network interface and tried to delete it, it says

Network interface is currently in use”

so i tried to detach it, then it says something like I don’t have the priveledge to detach it.

It turns out the above stackoverflow is correct, two things might contribute to this:

- If you have a VPC Elastic IP Address you created in the VPC you are trying to delete.- Check if you created a AWS ELB in the VPC.

in my case, it is an ELB; after manually deleting the ELB, I am finally able to delete the VPC.

yay!

--

--

Shi
CI/CD/DevOps

I am a coder/engineer/application security specialist. I like to play around with language and tools; I have strong interest in efficiency improvement.