skx / aws-utils

A small collection of AWS utilities, packaged as a single standalone binary.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow the user to specify the columns to show for csv-instances

skx opened this issue · comments

Today I was asked to provide a mapping of "name + IPv4" address for a bunch of accounts. This would have been easier if I could run:

  $ aws-utils csv-instances --fields="name,ipv4"

Of course once I realize this I can also say that the instances and csv-instances are very very similar (which they definitely are). Merging the two commands into one almost makes sense, but I use them for different purposes and it would be nice to keep the simple nature alone.

To close this issue:

  • Remove the duplication between the two commands, with regard to getting the data at least.
  • Allow the user to specify different fields for the CSV instnace, at least.
    • Ideally a template for the instances subcommand too.

No changes to the default behaviour from the end-user perspective though, even if they gain the ability to change the formatting/templates.