Hello, I am using the Infracost Github Actions Wor...
# help
w
Hello, I am using the Infracost Github Actions Workflow. I have an existing main branch with many terraform files, when I make a PR, the new resource price is calculated but the new monthly cost does not include the exisiting .tf files already on the default main branch. Is there a way to include the existing terraform files in the new monthly cost? Also, is it possible to exclude certain folders from Infracost? If I move a .tf file to that archive folder, I want Infracost to remove that .tf file's cost as if it was deleted
m
By default infracost only shows the costs of the projects that have changed in the PR, so if you have changed a
dev
and
prod
project, the new monthly cost is shown for just those projects. If you want to see all the projects you can use the
--show-all-projects
with the
infracost comment
command. It is also possible to exclude certain folders from infracost, you can either write a config file to support this or pass the
--exclude-path
flag to both
breakdown
and
diff
e.g.
infracost breakdown --path . --exclude-path archive