Hey! Why is the price returned by the GCP console ...
# help
a
Hey! Why is the price returned by the GCP console so different to what the API returns? Am I missing something? Many thanks in advance for the help!
w
$539.82 / 730 hours = 0.7394…
a
Ah ok! How would I get the cost of the gpu in that case?
w
Great question - you’d need to update the query filters to find those, search for GPU in the infracost/infracost code base to find the google resource filters for it
a
Thanks! Is a reason why for the gcp a100 the price doesn't come included in a call to get the price of a2-highgpu-1g or a2-ultragpu-1g as the a100 is embedded in that machine type?
Also for some GCP regions, if I make a call to get an instance's price, it doesn't seem to find a price for that region. I.e. query { products( filter: { vendorName: "gcp", service: "Compute Engine", productFamily: "Compute Instance", region: "us-west3", attributeFilters: [ { key: "machineType", value: "a2-highgpu-1g" } ], }, ) { prices( filter: { purchaseOption: "on_demand" }, ) { USD, purchaseOption, unit }, region, attributes { key value } } }
Do you have any suggestions for how to deal with this/whether you could add these regions?