https://infracost.io logo
#help
Title
# help
a

ambitious-spring-76637

09/25/2023, 11:05 AM
Hi team, @any way to calculate the cost of the deleted gcp resources using infracost
m

mysterious-teacher-68276

09/25/2023, 11:45 AM
hi @ambitious-spring-76637, are those resources in IAC? Infracost only works to estimate costs on resources you keep in IAC (e.g. Terraform)
a

ambitious-spring-76637

09/25/2023, 11:53 AM
yes, those resources are in IAC
m

mysterious-teacher-68276

09/25/2023, 11:56 AM
ok then it should be pretty simple: 1. if you have the GitHub app or something equivalent setup then opening a PR with those resources removed in IAC should show you the reduction in costs 2. If you’re running locally you’ll need to run a infracost diff on the code once the resources are removed. Using the
--compare-to
target as the infracost breakdown JSON before the resources were removed
a

ambitious-spring-76637

09/25/2023, 11:59 AM
Thanks Hugo