https://infracost.io logo
Title
g

great-market-18788

04/17/2023, 5:23 PM
Hello all, infracosts noob here. I have the generic .gitlab-ci.yml configured as per https://gitlab.com/infracost/infracost-gitlab-ci. I'm using Terraform Cloud to trigger speculative plans on commits to feature branches. I'm seeing 2 issues with Infracosts: 1. The Previous and New costs appear to be reversed. None of the infrastructure exists, and the terraform plan shows 50+ resources to deploy. I'm expecting the costs to increase, not decrease.
Project                                   Previous  New   Diff
gitlab/terraform-project/development      $369      $0    -$368.80
2. The "Getting Started" configuration on my Infracosts Dashboard is not recognising this pull request, so is stuck on
Step 6. Send a test pull request to see the cost estimate
w

white-airport-8778

04/17/2023, 5:27 PM
Hey @great-market-18788! 1. Did you copy/paste the .gitlab-ci.yml from that repo? So you’re running infracost against the terraform directory, and not the plan JSON? 2: In Infracost Cloud > Org Settings, is the Cost dashboard enabled?
g

great-market-18788

04/17/2023, 5:31 PM
1. That's right, I set
TF_ROOT
to my tf directory. Everything else in that .yml file is the same. I saw there was a tf cloud bash script that may have the answer? https://www.infracost.io/docs/troubleshooting/#terraform-cloud 2. Yes, Cost estimate dashboard is enabled
w

white-airport-8778

04/17/2023, 5:34 PM
Do you have time now to jump on a quick zoom screenshare call?
g

great-market-18788

04/17/2023, 5:35 PM
sure, thanks for the help 😄
w

white-airport-8778

04/18/2023, 12:17 AM
Just FYI I sent https://gitlab.com/infracost/infracost-gitlab-ci/-/merge_requests/51 to clarify the fix for the above issue - @mysterious-teacher-68276 can you plz review+merge?