jckuester / awsls

A list command for AWS resources
MIT License
838 stars 54 forks source link

Feature request / discussion: add a config file to remember which attributes to list for specific resources #11

Open jacobian opened 4 years ago

jacobian commented 4 years ago

I love awsls, it makes my live so much easier! I have an idea/feature request. I'd be happy to take a stab at a PR, but I want to make sure it's something you'd like first:

Nearly time I use awsls, I need to remember to give some specific -attributes to make the output useful. A quick trawl through my shell history shows things like

awsls -attributes instance_state,public_dns aws_instance
awsls -attributes=name,tags aws_ami
awsls -attributes vpc_id,cidr_block aws_subnet

repeated over and over again.

What if there was a config file that remembered that when I list AMIs, I want name and tags, etc? i.e., it could look something like

[awsls]
aws_instance = instance_state,public_dns
aws_ami = name,tags
aws_subnet = vpc_id,cidr_block

Then, awsls aws_instance would use those attributes.

Again, I'm happy to take a stab at a PR if this is something that you'd find useful and in line with your intentions for the tool. I'm not super-great at Go but I can probably come up with something reasonable as a starting point.

jckuester commented 4 years ago

Hi @jacobian :wave:

sorry for my late reply. This sounds actually like really great idea.

Just brainstorming here:

Creating a PR is very appreciated. If you have questions about Go or need feedback about your code at any point, let me know. If you get stuck, I can also jump in and help you finish the feature.

Thanks, Jan

jacobian commented 4 years ago

Lovely, sounds like we're thinking exactly on the same lines. Yes, I'll give this a stab and see where I can get, thanks!