Giter VIP home page Giter VIP logo

aws-delete-vpc's People

Contributors

soggiest avatar tklauser avatar twpayne avatar viktor-kurchenko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aws-delete-vpc's Issues

ENH: Provide region via CLI argument.

Nice tool isovalent. Saved me a bunch of effort. ๐Ÿป It would be awesome if there was a way to provide the region via the CLI, like ---region [[NON_DEFAULT_REGION_VALUE]]. I was able to edit my ~/.aws/config for each region and everything worked nicely. CLI argument is just a bonus awesome extra feature.

Cheers.

Delete Virtual Private Gateways

It looks like we're leaving Virtual Private Gateways in our wake after running terraform. Can we please add that are managed by this tool?

Add build instruction to README

There are no instructions on how to build this tool. I ran go build . just fine, but it'd be nice to have that information presented to the user.

Insufficient permissions leads to Elastic IPs not being released

#4 releases Elastic IPs, but I've encountered the following problem with the AWS API if permissions are not set correctly which leads to the Elastic IP not being released.

From the logs of a run:

$ aws-delete-vpc --cluster-name=twp-nwm3-2698053183
...
4:31PM INF DescribeAddresses AllocationIds=["eipalloc-07e568711c415fc49"]
4:31PM ERR ReleaseAddress error="operation error EC2: ReleaseAddress, https response error StatusCode: 400, RequestID: 70003f2b-351d-4f3b-b03a-06e3b41fa8f4, api error AuthFailure: You do not have permission to access the specified resource." AllocationId=eipalloc-07e568711c415fc49 PublicIp=34.251.241.48
4:31PM ERR DetachNetworkInterface error="operation error EC2: DetachNetworkInterface, https response error StatusCode: 400, RequestID: 25996d94-8ea1-453a-b50b-69bfcc01d29c, api error OperationNotPermitted: You are not allowed to manage 'ela-attach' attachments." AttachmentId=ela-attach-0fc5a7182c0fdd756
...
4:32PM ERR DeleteVpc error="operation error EC2: DeleteVpc, https response error StatusCode: 400, RequestID: b48e276b-a4c1-49e1-84cc-0b19c88d9bb8, api error InvalidVpcID.NotFound: The vpc ID 'vpc-07499152ed45c6325' does not exist" vpcId=vpc-07499152ed45c6325
4:32PM INF tryDeleteVpc deleted=true vpcId=vpc-07499152ed45c6325
4:32PM INF DeleteCluster Name=twp-nwm3-2698053183

What happens here is:

  1. aws-delete-vpc finds the Elastic IP through its attachment to a Network Interface used by the VPC.
  2. It then tries to release the Elastic IP, but the AWS API returns that the user does not have permission to do this.
  3. Deletion of the rest of the VPC proceeds and eventually succeeds, unassociating the Elastic IP from its Network Interface.
  4. At the end of this operation, the Elastic IP is not released, but as the VPC has been deleted, there is no way to identify that the Elastic IP was associated with the VPC, so the Elastic IP remains.

The net result is that the Elastic IP is not released.

I'm not sure if there's a way to fix this apart from using the correct permissions for the AWS profile used.

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.