This message was deleted.
# help
b
This message was deleted.
m
Hi @delightful-table-96636 yes Infracost should be able to support this
What does the output of
infracost generate config
look like when you run it in the root of your repo
d
Hi @mysterious-teacher-68276
Copy code
version: 0.1

projects:
  - path: .
    name: main-production
    terraform_var_files:
      - production/production.tfvars
    skip_autodetect: true
  - path: .
    name: main-staging
    terraform_var_files:
      - staging/staging.tfvars
    skip_autodetect: true
So the generate has picked up the required tfvars, would I just add this to the config in the root of the folder ; what about workspaces or are they not really needed in this context
m
yeah workspaces aren’t really needed by infracost unless you use terraform cloud and store your variables there. If the above output seems to reflect your project structure (which is seems like it does) then there’s nothing to do. the infracost
diff/breakdown
commands (run in the root of your repo) will autodetect the same projects (main/staging).
d
Winner, me over thinking and not taking a minute to calm down 🙂
👍 1