Title
#general
p

Paulo Correia

10/03/2022, 2:57 PM
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?
Tim (Infracost)

Tim (Infracost)

10/03/2022, 3:13 PM
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).
3:14 PM
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.
p

Paulo Correia

10/03/2022, 3:15 PM
I was thinking to have the tag thing to be part of the config file
3:15 PM
and a flag by project to tell if that project is to be aggregated or not
3:16 PM
those with "--aggregate=true" would be part of a overall table, while others would have their own summary
3:16 PM
just an idea
Tim (Infracost)

Tim (Infracost)

10/03/2022, 3:16 PM
oh that’s interesting.
p

Paulo Correia

10/03/2022, 3:16 PM
I will think a bit more on it