-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
add --all-dependencies option to ec2 delete-vpc #1721
Comments
Something like this might be handy, but it requires more magic smoke than I'm really comfortable with. I would suggest making this request on the EC2 forums. If they add it to their API, we'll be able to pick it up immediately. |
Good call. Done: https://forums.aws.amazon.com/thread.jspa?threadID=223412 |
I am in need for this feature, also. |
@JordonPhillips is not it all about just listing dependencies and removing them one by one, or is it something more than that? |
+1 Is there any progress with this feature? |
+1 frome me |
A definite +1 |
+1 |
+1 I have bunches of vpc's to be deleted. |
+1 |
6 similar comments
+1 |
+1 |
👍 |
+1 |
+1 |
+1 |
+1000 |
+1 |
3 similar comments
+1 |
+1 |
+1 |
+10000000 |
+1 |
5 similar comments
+1 |
+1 |
+1 |
+1 |
+1 |
+99999999999999999 If anyone wants I can provide a nodejs script I utilize for doing just this when I delete a eks cluster with eksctl since it can't clean the vpc for some reason because of dependencies. :) |
can yo share it? |
HAHAHA boss, I am trying the same thing !! |
Of course Amazon drags their feed in giving a cleanup tool as a big fat band-aid it would be reasonable if the vps delete command ( along with all similar aws cli commands ) had a verbose mode which showed offending still attached resources which are preventing the delete - D'oh |
This might help. It's in ruby, but it shows the ordering you need to delete VPC's. You will have to have tagged your resources to use this out of the box, but the order seem's to be key for a few of you. Resource order is a pain across the major Cloud's. We suffer daily. Hope this helps. If you have VPN gateways and peering you will just have to delete those before the rest of the resources in the script. Opens the musty tome https://gist.github.com/gregohardy/ef026eef3beddae49eb05ea0fe5993e0 |
So true unfortunately |
is there any way i can get what are the dependency attached to particular resource so before deleting main resource i will delete dependency first. |
i stuck in my task i want to delete all unused resource from my aws endvironment |
Seriously need this - can spend an entire day easily running around in circles trying to remove a VPC - its the most annoying nonsense. |
This is a basic feature everyone needs. It took me days to implement a VPC resource crawler to remove everything. +100000000000 |
+1 |
It's my script to delete a VPC with all dependencies |
Similarly, I've used https://github.com/toddm92/vpc-delete in the past. |
@lianghong thanks you legend that worked like a charm!! |
@lianghong u charming devil |
@lianghong THANK YOU ! |
Any update on this? Still really needed. |
+1 |
4 similar comments
+1 |
+1 |
+1 |
+1 |
I wrote a tool to delete a VPC and all of its dependencies: https://github.com/isovalent/aws-delete-vpc |
The AWS cli functionality should reflect that which is available in the AWS console. This issue should be reopened |
Awful that this doesnt exist still |
We need this functionality to handle IaC! |
+1 |
bump |
Feature request
support
aws ec2 delete-vpc --all-dependencies --vpc-id vpc-deadbeef
Details
The AWS web console will delete a VPC along with all its dependencies. The
aws
cli tool says (when trying to delete a VPC with any dependencies):A client error (DependencyViolation) occurred when calling the DeleteVpc operation: The vpc 'vpc-deadbeef' has dependencies and cannot be deleted.
Maybe also add
--vpn-connection
.The text was updated successfully, but these errors were encountered: