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

wide-dawn-16734

11/23/2021, 1:07 PM
Hello, That is my first handshake with infracost šŸ˜€ My project is made this way : ā€¢ folder for networking with a specific tfvars file ā€¢ folder for database with a specific tfvars file ā€¢ folder for compute with a specific tfvars file ... Is there a way to get only one single report that contains all the infrastructure cost estimation ?
šŸ¤ 1
šŸ‘‹ 1
l

little-author-61621

11/23/2021, 1:12 PM
Hi! You can use an Infracost config file and specify different
terraform_plan_flags
for each project to point to the different var files.
Something like this might work:
Copy code
version: 0.1

projects:
  - path: path/to/networking
    terraform_plan_flags: -var-file=networking.tfvars

  - path: path/to/database
    terraform_plan_flags: -var-file=database.tfvars
    
  - path: path/to/compute
    terraform_plan_flags: -var-file=compute.tfvars
5 Views