:wave: Hello, team! First time using infracost and...
# help
g
πŸ‘‹ Hello, team! First time using infracost and I'm getting the follwoing error in github:
Copy code
──────────────────────────────────
Project: terraform
Module path: terraform
Errors:
 Diff baseline error:
  No valid terraform files found given path, try a different directory

──────────────────────────────────

25 cloud resources were detected:
βˆ™ 6 were estimated
βˆ™ 18 were free
βˆ™ 1 is not supported yet, see <https://infracost.io/requested-resources>:
  βˆ™ 1 x azurerm_cognitive_account
c
Hi, are you using github actions or the github app?
g
Using the github app
c
Is there terraform code on the main branch of your repo?
g
There is.. otherwise how would it have detected all the resources?
My terraform project is modularized, does infracost have issues with moduralized setups?
w
@glamorous-church-86818 the auto-detect should pickup most repo structures, https://www.infracost.io/docs/features/config_file/ explains how you can customize the behavior so it processes the projects per your instructions
c
Can you check that there isn’t a syntax error with the terraform on the main branch? Infracost calculates a diff for a pr by comparing the parsed terraform on the pr branch against the main branch. If there is no tf code (or the tf code is unparseable) you would see that error even though we would still detect resources on the pr branch.
g
ah.. so I have nothing in my main branch, I use a branch below main which I called 'develop'. I assume I can adjust that using infracost config