hey people, some advice, I use a config file to s...
# general
a
hey people, some advice, I use a config file to setup 3 different projects, I run a diff,then post the results do azure devops, but instead of an overview by project it gives a sum of all projects, any way to have it generating 3 boards? or have a breakdown by project when using a config file?
c
Hi Paulo, like you discovered we don’t have a way to generate separate views for the projects within a config file, you just get the one overview. The best I can think of is you could use three separate config files and run
infracost breakdown
three separate times. Then if you’re using
infracost comment
use the
--tag=infracost_<your_project_name>
flag to have each run show up in a different comment (so they don’t overwrite each other). If you’re up for hacking the JSON output you could try generating the
infracost breakdown
as you are now, then parse out each element in the
"projects"
array and create a one-project json for each, then post using
infracost comment
with the
--tag
flag as above. This would be a bit fragile and I’m not sure what issues you might run into (you would want to adjust the top-level “total_…” keys for sure).
It might be a good idea to create a github issue proposing an enhancement that lets you filter which projects should be run from the config. I wonder if other people are running into this.
a
I was thinking to have the tag thing to be part of the config file
and a flag by project to tell if that project is to be aggregated or not
those with "--aggregate=true" would be part of a overall table, while others would have their own summary
just an idea
c
oh that’s interesting.
a
I will think a bit more on it