Why am I unable to delete my VPC, network inteface, subnets and Internet gateway?

0

Few days back I deployed a devops project on aws using EKS for which I used EC2 instances, VPC. I actually launched these services using teraform on Vs Code. Since this is the first time I'm using EKS, after completing the project instead of shutting down all the services from terraform using different commands I first terminated EC2 instances manually due to which I'm unable to delete these network related services from terraform. I deleted EKS cluster also manually but I'm unable to delete VPC beauce its showing that network interfaces are in use and if I try to delete network interface its also not deleting and the same problem with subnets and Internet gateway. The problem is they all are inter-related due to which I'm unable to delete anything. Please someone guide me as the bills are generating dialy because of elastic Ip addresses which are attached to VPC i'm dropping screenshots for reference VPC Network Interface Internet Gateway Subnet

2 Answers
0

Detach the internet gateway from the VPC first, (its in the dropdown) before trying to delete the Internet gateway

profile picture
answered 2 months ago
profile picture
EXPERT
reviewed a month ago
  • I tried detaching it but its showing - detaching internet gateway is unsuccessful because it has some mapped public address(es). Please unmap those public addresses before detaching the gateway. I really wanted to post the screenshot but i think its not possible to do it in a comment

0

Have you tried detaching the Internet Gateway from the VPC before you delete it?

profile pictureAWS
EXPERT
answered 2 months ago
  • I tried detaching it but its showing - detaching internet gateway is unsuccessful because it has some mapped public address(es). Please unmap those public addresses before detaching the gateway. I really wanted to post the screenshot but i think its not possible to do it in a comment

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions