aws-nuke icon indicating copy to clipboard operation
aws-nuke copied to clipboard

Getting dependency violation with VPC, while deleting from nuke

Open ukreddy-erwin opened this issue 2 years ago • 1 comments

Error I got:

us-west-2 - EC2VPC - vpc-043d412c4f7070315 - [ID: "vpc-043d412c4f7070315", IsDefault: "false", tag:Name: "ourproduct-dev-rm-969e-vpc"] - failed
us-west-2 - EC2RouteTable - rtb-0c36016642d3c2a57 - [DefaultVPC: "false"] - failed

Removal requested: 0 waiting, 2 failed, 5 skipped, 0 finished

us-west-2 - EC2VPC - vpc-043d412c4f7070315 - [ID: "vpc-043d412c4f7070315", IsDefault: "false", tag:Name: "ourproduct-dev-rm-969e-vpc"] - failed
us-west-2 - EC2RouteTable - rtb-0c36016642d3c2a57 - [DefaultVPC: "false"] - failed

Removal requested: 0 waiting, 2 failed, 5 skipped, 0 finished

us-west-2 - EC2VPC - vpc-043d412c4f7070315 - [ID: "vpc-043d412c4f7070315", IsDefault: "false", tag:Name: "ourproduct-dev-rm-969e-vpc"] - failed
us-west-2 - EC2RouteTable - rtb-0c36016642d3c2a57 - [DefaultVPC: "false"] - failed

Removal requested: 0 waiting, 2 failed, 5 skipped, 0 finished

ERRO[0057] There are resources in failed state, but none are ready for deletion, anymore.

us-west-2 - EC2VPC - vpc-043d412c4f7070315 - [ID: "vpc-043d412c4f7070315", IsDefault: "false", tag:Name: "ourproduct-dev-rm-969e-vpc"] - failed
ERRO[0057] DependencyViolation: The vpc 'vpc-043d412c4f7070315' has dependencies and cannot be deleted.
        status code: 400, request id: 822ec66c-0a20-43d6-ba22-0861ee8f0970
us-west-2 - EC2RouteTable - rtb-0c36016642d3c2a57 - [DefaultVPC: "false"] - failed
ERRO[0057] DependencyViolation: The routeTable 'rtb-0c36016642d3c2a57' has dependencies and cannot be deleted.
        status code: 400, request id: 17877fae-4b05-4e3b-a08c-9ecc721a1ca0
Error: failed

The config file:

regions:
- us-west-2
- us-west-1

account-blocklist:
- "999999999999" # production

resource-types:
 targets:
 - ELB
 - ELBv2
 - S3Bucket
 - EKSCluster
 - EKSFargateProfiles
 - EKSNodegroups
 - AutoScalingGroup
 - AutoScalingPlansScalingPlan
 - EC2Volume
 - StorageGatewayVolume
 - EC2Instance
 - EC2InternetGateway
 - EC2InternetGatewayAttachment
 - EC2KeyPair
 - EC2NATGateway
 - EC2NetworkACL
 - EC2NetworkInterface
 - EC2PlacementGroup
 - EC2RouteTable
 - EC2SecurityGroup
 - EC2Subnet
 - EC2VPC


accounts:
 "<AccountID>": {}

<AccountID> will be replaced with my original account ID of AWS.

No dependencies left when trying to delete from console after this, it showing no dependencies also

ukreddy-erwin avatar Apr 27 '22 17:04 ukreddy-erwin

Hello. You could try deleting the route table via CLI. AFAIK the aws cli does not delete any dependencies like the web console does. Maybe the output of the CLI states more clearly what dependency is left.

svenwltr avatar May 30 '22 08:05 svenwltr