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

Support wait for dependent resources

Open naumannt opened this issue 4 years ago • 5 comments

Example: we use Terraform to create a EBS-Instance and three ElPs and connect them. cloud-nuke now runs into an issue: the EIPs can not be deleted while the EBS instance still exists, because EIPs can not be deleted while they are assigned. Even running cloud-nuke twice in a row (we are trying to use it to automatically reset an account regularly) does not solve this problem, because the EBS-instance requires time to shut down - more time than cloud-nuke running twice.

Would cloud-nuke considering such dependencies be something that could be added in the future? Since EBS-removal is already supported by cloud-nuke, how did you deal with such cases?

naumannt avatar Jul 30 '20 07:07 naumannt

EBS instance? Do you mean an EC2 Instance? An EBS Volume? An EC2 Instance with EBS Volumes?

brikis98 avatar Aug 01 '20 13:08 brikis98

I mean an EBS application or environment. Theoretically the same can apply to EC2, but EIPs and S3 buckets are directly created from EBS, so that the problem appears more in the context of EBS.

It's more a general problem; it's also why Terraform waits while resources are destroyed, for example.

naumannt avatar Aug 03 '20 06:08 naumannt

Sorry for the long delay. Got pulled away to focus on other things.

I mean an EBS application or environment.

Sorry, still not following. By EBS, do you mean Elastic Beanstalk? Or Elastic Block Store?

brikis98 avatar Sep 14 '20 12:09 brikis98

@naumannt do you still need any help here?

ina-stoyanova avatar Sep 27 '21 16:09 ina-stoyanova

I meant Elastic Beanstalk Environment, yes.

This was a while ago, so I don't know if there was any changes regarding dependency resolution, and I didn't use Cloudnuke i quite a while.

naumannt avatar Oct 04 '21 06:10 naumannt

Hey @naumannt, we are trying to be aware of the dependency between resources during the nuking operations. There are some resources that has logic to wait for certain resources to be deleted.

james03160927 avatar Oct 13 '23 23:10 james03160927

Since this issue has not been active for almost 2 years, will close this issue for now.

james03160927 avatar Oct 13 '23 23:10 james03160927