Hi, I think I’ve found a little bug in the infraco...
# contributors
s
Hi, I think I’ve found a little bug in the infracost vscode extension (version v0.2.6 installed) when summing up the total costs per project: The project total costs sum up all tree childs, which is not correct, because the tree contains the .tf file and the resources/modules within. See screenshot attached. The google/apps/europe-west1/dev project should only say “$73.00” instead of “$146.00" (which is just the double as the main.tf and the module are child elements of the project). Greetings, Jo
The cli is correct:
Copy code
❯ infracost --version                                
Infracost v0.10.18
❯ infracost breakdown --path google/apps/europe-west1
Evaluating Terraform directory at google/apps/europe-west1
Detected Terraform project at google/apps/europe-west1/dev
Detected Terraform project at google/apps/europe-west1/prod
Detected Terraform project at google/apps/europe-west1/stage
Warning: Input values were not provided for following Terraform variables: "variable.region". Use --terraform-var-file or --terraform-var to specify them.
Warning: Input values were not provided for following Terraform variables: "variable.region". Use --terraform-var-file or --terraform-var to specify them.
Warning: Input values were not provided for following Terraform variables: "variable.region". Use --terraform-var-file or --terraform-var to specify them.

Project: redbullmediahouse/ea-cloud-terraform/google/apps/europe-west1/dev
Module path: dev

 Name                                                                             Monthly Qty  Unit   Monthly Cost 
                                                                                                                   
 module.google_gke_cluster_one.google_container_cluster.default                                                    
 └─ Cluster management fee                                                                730  hours        $73.00 
                                                                                                                   
 module.google_gke_cluster_one.google_container_node_pool.default["nodepoolone"]                                   
 ├─ Instance usage (Linux/UNIX, on-demand, n1-standard-4)                               2,190  hours         $0.00 
 └─ Standard provisioned storage (pd-standard)                                            300  GB            $0.00 
                                                                                                                   
 Project total                                                                                              $73.00 

──────────────────────────────────
Project: redbullmediahouse/ea-cloud-terraform/google/apps/europe-west1/prod
Module path: prod

 Name                                                                             Monthly Qty  Unit   Monthly Cost 
                                                                                                                   
 module.google_gke_cluster_one.google_container_cluster.default                                                    
 └─ Cluster management fee                                                                730  hours        $73.00 
                                                                                                                   
 module.google_gke_cluster_one.google_container_node_pool.default["nodepoolone"]                                   
 ├─ Instance usage (Linux/UNIX, on-demand, n1-standard-4)                               2,190  hours         $0.00 
 └─ Standard provisioned storage (pd-standard)                                            300  GB            $0.00 
                                                                                                                   
 Project total                                                                                              $73.00 

──────────────────────────────────
Project: redbullmediahouse/ea-cloud-terraform/google/apps/europe-west1/stage
Module path: stage

 Name                                                                             Monthly Qty  Unit   Monthly Cost 
                                                                                                                   
 module.google_gke_cluster_one.google_container_cluster.default                                                    
 └─ Cluster management fee                                                                730  hours        $73.00 
                                                                                                                   
 module.google_gke_cluster_one.google_container_node_pool.default["nodepoolone"]                                   
 ├─ Instance usage (Linux/UNIX, on-demand, n1-standard-4)                               2,190  hours         $0.00 
 └─ Standard provisioned storage (pd-standard)                                            300  GB            $0.00 
                                                                                                                   
 Project total                                                                                              $73.00 

 OVERALL TOTAL                                                                                             $219.00 
──────────────────────────────────
21 cloud resources were detected:
∙ 6 were estimated, all of which include usage-based costs, see <https://infracost.io/usage-file>
∙ 15 were free, rerun with --show-skipped to see details
❯
l
@stocky-salesmen-15167 yeah that looks like a valid issue. Can you create a GitHub issue for it here please? https://github.com/infracost/vscode-infracost/issues
s
l
Thank you! 🙏