awless icon indicating copy to clipboard operation
awless copied to clipboard

Display specific tags in columns

Open fitchtravis opened this issue 7 years ago • 5 comments

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

  • Trav

fitchtravis avatar Apr 09 '18 14:04 fitchtravis

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.

fxaguessy avatar Apr 09 '18 15:04 fxaguessy

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

fitchtravis avatar Apr 11 '18 11:04 fitchtravis

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

simcap avatar Apr 11 '18 11:04 simcap

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

snerdish avatar May 02 '18 01:05 snerdish

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.

simcap avatar May 02 '18 08:05 simcap