https://infracost.io logo
#help
Title
# help
a

ancient-shoe-76686

03/29/2023, 12:56 AM
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

white-airport-8778

03/29/2023, 2:51 AM
$539.82 / 730 hours = 0.7394…
a

ancient-shoe-76686

03/29/2023, 2:54 AM
Ah ok! How would I get the cost of the gpu in that case?
w

white-airport-8778

03/29/2023, 5:46 AM
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

ancient-shoe-76686

04/01/2023, 4:36 PM
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?
2 Views