Closed ckdake closed 5 months ago
Hi @ckdake,
Thanks for raising this issue, and many thanks for including the Terraform snippet. I've tested this out on my machine and have replicated the issue. This seems to be because we don't support db.serverless
instance_class
for rds_cluster_instance
. Right now it seems like we're not fetching the correct pricing entries from our cloud pricing API when the serverless option is used. Having a quick poke around the cloud pricing schema, it's not entirely obvious where these are hiding, as they don't seem to be displayed under the AmazonRDS
service as would be expected. So it might be something going on with our scrapers. I'm going to rename the title of your issue to reflect adding support for the db serverless option.
On a further point, it seems we've confused you a little with the --sync-usage-file
flag. This is experimental and only works for a set subset of resources: https://www.infracost.io/docs/features/usage_based_resources/#fetch-from-cloud-apis . We have a more robust solution called Actual Costs https://www.infracost.io/docs/infracost_cloud/actual_costs/ as part of our cloud product. You can also just specify the usage manually using the usage file: https://www.infracost.io/docs/features/usage_based_resources/#specify-usage-manually I hope this helps.
Thanks! That all makes sense. This is my first run looking at usage-based resources. The nature of our setup makes manually getting things right a little more time consuming than is probably worth it (Too Many Things with vastly differing costs), and we're not quite ready for Infracost Cloud yet.
We use AWS RDS Serverless V2, and I'm expecting to see usage data when running
infracost --sync-usage-file
. Instead, I'm seeing this in the info output frominfracost
:No products found for module.database.aws_rds_cluster_instance.rds_cluster_instance Database instance (on-demand, db.serverless), using 0.00
The relevant terraform bits:
I'm running infracost with an AWS_PROFILE that has full administrative read access, and it's able to correctly pull usage data for all of the other resources we use.
Should infracost be able to find the product for this resource? Should I do something differently? Thanks!