diodonfrost / terraform-aws-lambda-nuke

Terraform module that creates a lambda to destroy all resources in an AWS account.
Apache License 2.0
20 stars 15 forks source link

Unable to remove ec2 instance #2

Closed quickbooks2018 closed 4 years ago

quickbooks2018 commented 4 years ago

[WARNING] 2020-02-20T18:52:51.507Z a2d2eb-2fc7-441b-8069-1983e7765bfe security group sg-e15642ca: An error occurred (DependencyViolation) when calling the DeleteSecurityGroup operation: resource sg-e142ca has a dependent object

diodonfrost commented 4 years ago

its looks like the security group is still attached to an ec2 instance. Maybe the instance is not fully deleted when the lambda function try to nuke this security group

quickbooks2018 commented 4 years ago

Yes issue is in the code, my job is done via https://github.com/rebuy-de/aws-nuke

diodonfrost commented 4 years ago

Fixed in version 2.7.1 with boto3 waiter.

quickbooks2018 commented 4 years ago

Worked Thanks