https://infracost.io logo
#contributors
Title
# contributors
s

stocky-salesmen-15167

03/14/2023, 8:11 AM
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

little-author-61621

03/14/2023, 10:42 AM
@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

stocky-salesmen-15167

03/14/2023, 11:23 AM
l

little-author-61621

03/14/2023, 11:26 AM
Thank you! 🙏
9 Views