Coder Social home page Coder Social logo

aws-delete-vpc's Introduction

aws-delete-vpc

Delete Virtual Private Clouds in Amazon Web Services.

Motivation

VPCs can only be deleted when all of their dependent resources are deleted, and AWS does not provide any tools to do this automatically.

Installation

To install the latest aws-delete-vpc release run:

$ go install github.com/isovalent/aws-delete-vpc@latest

Build

To build aws-delete-vpc from source please run the following locally:

$ go build .

Usage

Syntax:

$ aws-delete-vpc -vpc-id=$VPC_ID

or

$ aws-delete-vpc -cluster-name=$CLUSTER_NAME

This will attempt to delete the specified VPC and its dependent resources. Several attempts may be needed due to limitations of the AWS API.

If the optional -cluster-name flag is passed then the VPC ID will be discovered automatically and any EKS cluster with the same name deleted after the VPC is deleted.

Known limitations

Currently the program is unable to identify AutoScalingGroups associated with the VPC unassisted. Instead, it looks for and deletes AutoScalingGroups with the tag key and value specified by the autoscaling-tag-key and autoscaling-tag-label command line flags.

Many AWS API calls return incorrect values that prevent the program from operating correctly. Known problems include:

  • DeleteVpc will return a DependencyViolation error when there are no dependent resources, but the VPC will eventually be deleted.

  • InstanceTerminatedWaiters return that an instance has terminated before it has actually terminated, meaning that deleting related resources (e.g. NetworkInterfaces) will fail.

  • There is no API to wait for a NetworkInterface to be detached.

Some resources (e.g. InternetGateways, NetworkInterfaces, and VpnGateways) must be detached before they can be deleted. If the program is interrupted between detachment and deletion these resources will not be deleted the next time the program is run.

Future: may lose resources if program is interrupted between detach and delete.

References

License

Apache-2.0

aws-delete-vpc's People

Contributors

soggiest avatar tklauser avatar twpayne avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.