https://infracost.io logo
#general
Title
# general
b

brief-agency-83899

11/24/2021, 10:52 AM
heh, why did I not know you can have many -run(s) in your step 🙂. Ok I’ll get a build sorted and report back. Many thanks
w

white-airport-8778

11/24/2021, 10:54 AM
🙂 @little-author-61621 should that be
terragrunt show -no-color -json $PLANFILE > $PLANFILE.json
since Callum’s using terragrunt?
👍 1
b

brief-agency-83899

11/24/2021, 10:55 AM
Yeah thanks, I get the gist I also don’t want to rm the planfile as I need that for the apply step
👍 1
Just getting back on this now, Has something changed between terraform and infracost? we never had to do the change for terraform to output the json in this way before.
w

white-airport-8778

11/24/2021, 1:28 PM
Nope, the infracost CLI still works with the plan binary file too and the atlantis_diff script looks for this to pass those to the CLI. I just thought it’s easier to debug if you feed infracost the plan JSON
b

brief-agency-83899

11/24/2021, 3:31 PM
OK so modifying the output to the json format worked, it doesn’t work with the binary output
It may be that something is happening inside our CI setup, I know someone recently swapped out the container underneath where this all runs so its possibly something there
w

white-airport-8778

11/24/2021, 3:55 PM
Great - just so I understand, you had Infracost working and then it stopped working in Atlantis?
b

brief-agency-83899

11/24/2021, 3:57 PM
No we had it working in atlantis
I think the last good working combination was 0.9.12 infracost, 0.35.6 terragrunt and atlantis 0.17.5
unfortunatly its not really too easy for me to roll back and check it
w

white-airport-8778

11/24/2021, 4:11 PM
np at all - I’m glad you got it working. Unrelated to the above, @little-author-61621’s been exploring PR commenting options for Atlantis as we’re thinking of providing an option fo the Infracost comment to be separate from Atlantis’ comment - we’ve found a way to make it work for single project runs. But for multi-project runs (when there are multiple $PLANFILES in 1 Atlantis comment), it doesn’t seem like there’s a way for us to merge the Infracost comments. Atlantis has a pre-workflow hook but not a post-workflow hook… Just mentioning this in case you have any ideas - or thoughts on if you’d prefer 1 updating comment per $PLANFILE, or 1 PR comment that gets updated with all the $PLANFILEs.
6 Views