electrolux-oss / infrawallet

Backstage plugin that controls your cloud costs just in the way how you control your bank accounts
https://demo.infrawallet.io
Apache License 2.0
58 stars 4 forks source link

Group by tag #105

Open elisiariocouto opened 3 weeks ago

elisiariocouto commented 3 weeks ago

Hello everyone.

We are using a tag system in all our Cloud Providers to identify "departments". I see two competing concepts in here:

  1. the group by tags feature takes the values from the configuration file
  2. we can filter by any tag from the cloud provider, and, in this case, the plugin retrieves the possible values from the cloud provider

Is it possible to group by tags, making the plugin retrieve the possible values from the cloud providers? Since this "departments" concept is always changing, it would be super nice to have the tag system dynamic in the group by feature

Thank you in advance Elisiário Couto

gluckzhang commented 3 weeks ago

Hi @elisiariocouto, thank you for the nice feedback. I agree supporting grouping by tags from cloud providers will be very helpful. We will discuss it and see how to support it :)

gluckzhang commented 3 weeks ago

Hi @elisiariocouto, by the way, is it OK to share for what cloud providers your team has set this departments tag? Currently, InfraWallet only supports AWS cost allocation tags and Azure resource tags as a filter, and we are also interested in setting a future plan for supporting other providers.

elisiariocouto commented 3 weeks ago

Hello @gluckzhang, thank you for your answer. We use the same tag in both AWS and Azure. Using these providers, I think the implementation would be somewhat simple since most of the code to get the tag values and whatnot is already implemented in the filter feature. I must confess that I'm trying to implement this on my own but no luck so far 😅

gluckzhang commented 3 weeks ago

@elisiariocouto Thank you for trying that! 🚀

One of the tricky parts I see is that AWS CostExplorer GetCostAndUsage API only supports at most two grouping dimensions, and we already use them for 1. supporting root/linked acounts, and 2. supporting service categorization.

Anyway what you suggest is also something needed by us. We will see how to support it and make InfraWallet cooler :D

emillg commented 2 weeks ago

@elisiariocouto Just want to confirm, do you set departments as cost allocation tags in AWS? Are you able to group by it in AWS Cost Explorer today?

elisiariocouto commented 2 weeks ago

Hello @emillg, yes, these tags are configured as cost allocation tags and I'm able to group by this tag in the AWS Cost Explorer.