wallix / awless

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

unable to filter scalinggroups using tags #183

Closed varunchandak closed 6 years ago

varunchandak commented 6 years ago

I am trying to get output of hundreds of ASGs in my infra, but I am unable to filter them using tags.

Command: awless list scalinggroups -p PROFILE --tag Environment=loadtesting

No results !

fxaguessy commented 6 years ago

Hello,

Thanks for the improvement suggestion. Until now we did not fetch the tags of autoscaling groups in our local model (for example you will not see them in awless show command), thus we can not filter on tags. However, this should be easy to add (c.f. here). We are currently on an important design improvement of the AST used to compile templates, but afterward we will add this to the model.

simcap commented 6 years ago

@varunchandak Available in latest (stable and compatible) master for validation.

Tags are now part of the model on auto scaling groups. You can see them all for a specific scalinggroup by doing:

awless show my-scaling-group-name -l

You can filter using tags with the usual tag flags available in listing:

awless ls scalinggroups --tag-key Env
awless ls scalinggroups --tag-value loadtesting
awless ls scalinggroups --tag Env=Production

Note that filtering via tags is case sensitive and has to be an exact match (there is an issue to improve on that and consider wildcards).

Let me know if that works well for you and I will close this issue. Thanks!

simcap commented 6 years ago

I will close this issue then. Re-open if needed

varunchandak commented 6 years ago

just tested this and it's working as intended. Thanks !