Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nuke VPCs and related resources #57

Closed
brikis98 opened this issue Mar 18, 2019 · 7 comments
Closed

Nuke VPCs and related resources #57

brikis98 opened this issue Mar 18, 2019 · 7 comments
Labels
enhancement New feature or request p:queued

Comments

@brikis98
Copy link
Member

A nice to have (but not critical) for the future would be the ability to nuke VPCs and all related resources:

  • The VPC itself
  • Subnets
  • Route tables
  • NACLs
  • VPC endpoints
  • NAT Gateways
  • ENIs / EIPs
@brikis98 brikis98 added enhancement New feature or request help wanted labels Mar 18, 2019
@andrewalvintran
Copy link

I am interested in working on this and I created some files to delete the VPC itself, but of course if there are resources associated with the VPC, then you must delete them first or the VPC cannot be deleted. What would be the general approach for nuking the resources associated with the VPC?

Should you first nuke all of the VPC related resources individually, and then nuke the VPC?

@brikis98
Copy link
Member Author

Should you first nuke all of the VPC related resources individually, and then nuke the VPC?

Yup! Probably need to delete subnets, route tables, peering connections, and VPC endpoints first.

@bwhaley
Copy link
Contributor

bwhaley commented Aug 20, 2019

FWIW, the code to delete VPCs is implemented now, although it can only be invoked through the defaults-aws subcommand. It would be a quick change to add it to the normal aws subcommand.

@ekristen
Copy link
Contributor

I would like to see this implemented ASAP and I'm happy to help, would it be preferred to re-use the same code used for the default vps or would it be better to implement like the rest of the resources all individually and in the right order?

@bwhaley
Copy link
Contributor

bwhaley commented Nov 16, 2021

Hi @ekristen - thanks for offering to help! You should be able to reuse the functionality of NukeVpcs() which deletes all the stuff in the correct order already. Just call it with different inputs.

@ekristen
Copy link
Contributor

@bwhaley #243

@bwhaley
Copy link
Contributor

bwhaley commented Nov 17, 2021

Fixed in #243. Thanks to @ekristen.

@bwhaley bwhaley closed this as completed Nov 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request p:queued
Projects
None yet
Development

No branches or pull requests

7 participants