onepowerltd/aws-sg-visualize — pull request #2 by jeffb-bt (2014-09-17 13:40:55+00:00)
Title: Enhancements

I was a bad coder and put all of these in the same commit, and at least the last one (the decorate option) you don't want in your source until the graph maintainer officially adds it (PR's in, we're discussing it). The pp module is not something you're likely going to want in the source either.

The rest of the changes are pretty good, and for once my Ruby wasn't even awful. This adds a -V option for a vpc-id regex match, as well as properly supporting port ranges in secgroup rules. The use of env makes your script more easily portable for people who don't have ruby in /usr/local.

Please take any of these changes you want to and discard this PR. I know it's a bit annoying to try to merge it in as-is.

Use env ruby instead of hardcoding

Require pretty print module for debugging

Add -V option for matching vpc-id regex

Add support for port ranges in output

Add decorate option for edges (experimental patch to graph)