https://infracost.io logo
Title
k

kind-planet-77251

03/16/2023, 1:37 AM
Does this look incorrect? AWS RDS price 0 even though it is not free tier: size is
db.t3.medium
. The infracost says class is mock, little weird. Latest release 0.10.18 and command used was:
infracost breakdown --path .
in the folder that has the tf files and tfvars etc. This stack is live.
Name                                                                       Monthly Qty  Unit                    Monthly Cost 
 module.dss_comp_database.aws_db_instance.postgres[0]                                                                         
 ├─ Database instance (on-demand, Single-AZ, db_instance_class-mock)                730  hours                          $0.00 
 └─ Storage (general purpose SSD, gp2)                                               20  GB                             $2.54
c

crooked-daybreak-55253

03/16/2023, 1:50 AM
Hi Oliver, yeah the
db_instance_class-mock
indicates that we weren’t able to figure out the instance class from the HCL or the tf vars. Any chance you could share the minimal code that reproduces the issue?
k

kind-planet-77251

03/16/2023, 2:48 PM
I'll see what I can do to get a MCVE. BTW there needs to be better warning about stuff like that. I don't mind if it cannot get the cost estimate, but it needs to let the user know more obviously when there is data that affects cost that it could not find. Eg it could say
WARNING: Incomplete cost because the following parameters were not found: 
- RDS instance class
- ...
c

crooked-daybreak-55253

03/16/2023, 4:35 PM
Thanks an MCVE would be great. You should be seeing a warning log along the lines of
No products found for module.dss_comp_database.aws_db_instance.postgres[0] Database instance (on-demand, Single-AZ, db_instance_class-mock), using 0.00
, but it would be great if we could specifically call out the case where mock values are used. We’ve actually had discussions about this before but we haven’t come up with a nice way to do it yet.
k

kind-planet-77251

04/12/2023, 4:25 AM
@crooked-daybreak-55253 ^^^
c

crooked-daybreak-55253

04/13/2023, 9:41 AM
Thanks! I saw it and have a story on our sprint.