wallix / awless

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

Support wildcards in tag filters #187

Closed nhandler closed 5 years ago

nhandler commented 6 years ago

Right now, if I want to list instances with a certain tag, I need to provide a complete key and/or a complete value. It would be helpful if I could include wildcards to get partial matches. i.e. awless list instances --tag "Env*=prod*" would match keys of Env and Environment with values of prod as well as production.

simcap commented 6 years ago

@nhandler Indeed, we need to be able to grab resources with fuzzy tags values. (Note the filter flag --filter does indeed this kind of matching - although without any wildcards since it uses a strings.Contains matching)

So we will provide a solution while trying to have a coherent and common CLI syntax. Your syntax seems like a good proposition.

(I am sure you know about those but I mention them anyway, you can filter with only tag values or keys with the flags --tag-value and --tag-key. Although same issue here no wildcard and case sensitive.)