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

Remove Default DHCP Options Set

Open sumodirjo opened this issue 4 years ago • 4 comments

I'm trying this tool and can cleanly remove defaults VPCs on all regions but the default DHCP options are not removed. Are there any reason not to remove DHCP option set? Thank you

sumodirjo avatar Jun 04 '20 02:06 sumodirjo

@bwhaley I believe you added the default VPC clean up code. Could you answer this one?

brikis98 avatar Jun 07 '20 11:06 brikis98

@bwhaley pinging you again :)

marinalimeira avatar Sep 27 '21 15:09 marinalimeira

There's no reason not to do it. I've just confirmed that if you delete a default VPC and the default DHCP options, then recreate the default VPC (aws ec2 create-default-vpc), it will also recreate the DHCP options. Should be relatively straightforward to add it.

bwhaley avatar Sep 27 '21 16:09 bwhaley

Thanks for looking into this Ben! I'll update the labels and queue it to be ready for picking up.

ina-stoyanova avatar Sep 28 '21 14:09 ina-stoyanova

Something to note. While I was testing vpc nuking operation, I noticed:

  • After disassociating VPC from DHCP options, when I tried to delete it, the first attempt failed.
  • When I reran to delete the DHCP option, it went through.

I'm thinking we should leave the current logic to disassociate DHCP option from VPC when nuking vpc and creating another resource types in cloud-nuke to clean up left over DHCP options?

james03160927 avatar Sep 28 '23 00:09 james03160927