Hi Everyone. My project is using terragrunt to pro...
# help
d
Hi Everyone. My project is using terragrunt to provision infrastructure. For pull request automation we also use an Atlantis. In atlantis config we have partion of code that related to infracost:
Copy code
- run: |
                  # Convert binary plan file to JSON
                  cd $(dirname $PLANFILE)/.terragrunt-cache/*/*
                  terraform show -json $PLANFILE > /tmp/plan.json
                  infracost breakdown --path=/tmp/plan.json \
                    --format=json \
                    --out-file=/tmp/infracost.json
                  INFRACOST_VCS_PROVIDER=gitlab \
                  INFRACOST_VCS_REPOSITORY_URL=<https://gitlab.sportlab.me/betting/infrastructure/terragrunt> \
                  INFRACOST_VCS_TOKEN=$GITLAB_TOKEN \
                  infracost output --path=/tmp/infracost.json \
                    --format=gitlab-comment \
                    --show-skipped
For now we started to put terragrunt cache to single dir, with help of system variable TERRAGRUNT_DOWNLOAD_DIR. As you may see, before we used cd command to move to .terragrunt-cache directory which was located inside terragrunt module. But now we started to locate cache in dedicated directory inside which there are directories named with only hash. Because of that we receive an error:
Copy code
2025-11-27T14:44:03Z ERROR Could not autodetect any projects from path "/tmp/plan.json"
2025-11-27T14:44:03Z INFO Output saved to /tmp/infracost.json
Maybe someone can help with suggestion how to solve this? Thanks in advance!
e
Hey Davyd, I think the issue will auto-resolve if you use the GitLab app; as that has the auto-detect in it. If you go to dashboard.infracost.io - settings at the top right, org settings - integrations - add integration - GitLab etc.
🙏 1