wallix / awless

A Mighty CLI for AWS
http://awless.io/
Apache License 2.0
4.97k stars 263 forks source link

Display specific tags in columns #203

Open fitchtravis opened 6 years ago

fitchtravis commented 6 years ago

Hi there,

I was wondering if it would be possible to return the value of a tag-key search in a column on EC2/RDS list instances command

I'd like to return the key-pair value as a result on a column. Something like

awless list instances --tag-key Owner --column-output

fxaguessy commented 6 years ago

Hi, you can list the "tags" column in the list output:

awless list instances --columns id,tags --tag-key Owner

or with a csv output:

awless list instances --columns id,tags --tag-key Owner --format csv

However, we do not yet fetch tags in RDS instances, so this is, for now, only available for EC2 resources (instances, subnets,...)

Note, if you only want to list the tags (without ids), there is a small bug (fixed on master with 3f4e4ea476d45a5f26599dba625e4f1df6647b81). This will be integrated in next version that will be released this week.

fitchtravis commented 6 years ago

Unfortunately that command brings back all the tags when it makes a match, and not just that specific tag

simcap commented 6 years ago

Yes, indeed. It will be so for the next versions as we might focus on other topics.

snerdish commented 6 years ago

I literally had a request to produce this column type this morning, this would be very handy.

simcap commented 6 years ago

Indeed @snerdish it would be very handy.

The challenge is that the implementation needs to be clever enough to fit in correctly. We need to stretch a bit the current design to allow flexibility with extra columns (ex: for instance a Region column with future feature of displaying multi region).

Also, we temporarily not have enough resources for this issue.