Title
#general
f

Felipe Saravia

11/22/2022, 2:24 PM
Hi Guys! i have one question above case of use with Terragrunt, i runned a test but in breakdown result i only have cost of one module and not show me cost of second module, any please can help me?
2:26 PM
2:26 PM
Alistair (Infracost)

Alistair (Infracost)

11/22/2022, 2:30 PM
Hi @Felipe Saravia can you share the exact command you are running please?
f

Felipe Saravia

11/22/2022, 2:30 PM
Yes @Alistair (Infracost)
2:31 PM
infracost breakdown --path .
2:32 PM
and I am currently positioned at the HCL file path
Alistair (Infracost)

Alistair (Infracost)

11/22/2022, 2:59 PM
does the second module have a
provider
block? That’s how we detect that it is a root module
f

Felipe Saravia

11/22/2022, 3:06 PM
Thanks I check it
3:34 PM
3:35 PM
@Alistair (Infracost) Yes the second module have a
provider
file
Alistair (Infracost)

Alistair (Infracost)

11/22/2022, 3:37 PM
👍 so from what I can see this is in the
.infracost
directory. So I’m assuming this is a remote module and infracost has downloaded it right?
f

Felipe Saravia

11/22/2022, 3:39 PM
yes it is right
Alistair (Infracost)

Alistair (Infracost)

11/22/2022, 3:51 PM
and how is that module being called from your code?
f

Felipe Saravia

11/22/2022, 3:52 PM
module "nodepool_app" {
  source                  = "git::<https://------>-/tf_modules/tf_gcp_gke_node_pool.git?ref=1.0.0"
}
Alistair (Infracost)

Alistair (Infracost)

11/22/2022, 3:55 PM
I wonder if the resources inside that module are detected as having zero cost. I noticed it says “3 were estimated” but only displays the cluster cost, so that suggests it estimated 2 others that have no cost.
f

Felipe Saravia

11/22/2022, 4:50 PM
@Alistair (Infracost) But in site of Google Cloud Pricing Calculator
4:50 PM
These resources do have a cost
Alistair (Infracost)

Alistair (Infracost)

11/22/2022, 5:00 PM
can you run
infracost breakdown --path=. --format=json
so we can see what the raw json result is for them
f

Felipe Saravia

11/22/2022, 5:04 PM
Alistair (Infracost)

Alistair (Infracost)

11/22/2022, 5:10 PM
Okay, yeah it looks like the
hourlyQuantity
is 0 for those, which means it will have no cost. So I wonder why infracost is detecting those as zero. What do you have set for the
initial_node_count
,
node_count
and
autoscaling
attributes?
f

Felipe Saravia

11/22/2022, 7:16 PM
node_count = 1
7:18 PM
and the other values are not present in the module definition
Alistair (Infracost)

Alistair (Infracost)

11/22/2022, 8:16 PM
Ok thanks, are you able to post the terraform code for the node pool and cluster so we can reproduce it?
8:54 AM
Happy to pair on zoom as well if that helps.