Dumb question. I’m trying to use the GraphQL API t...
# help
l
Dumb question. I’m trying to use the GraphQL API to find the cost of GKE node pools and so on… I know about this example, and I found these docs, but perusal of the API source and searching in source graph seems to turn up no mentions of container node pools anywhere. I guess I have to correlate the pools to instance types…?
b
Hello! Your best bet would be to download the db and search through the SQL records. Each provider has their own names for attributes
l
Another useful resource is seeing the queries the Infracost CLI makes. Here’s what we use for GKE node pools: https://github.com/infracost/infracost/blob/master/internal/resources/google/compute_cost_component_helpers.go#L34
b
l
oh very lovely. thanks so much.
w
@lively-application-74937 we’d love to learn about your use-case too - is this something you’re wanting to integrate into Moment.dev?
l
So we have a bunch of customers who do “infra stuff” and it would be nice to have cost info sort of directly integrated into specific workflows. For example, people spin up a bunch of test clusters or something, and having cost analysis directly in the spin up/spin down UI is helpful. Now, ideally we tell them to just sign up for infracost and then we let them hit your API to get cost info… but it seems like we cannot do that with the API as it exists now which is kind of a bummer.
But, makes sense. You’re probably focused on important stuff like generating reports and so on.
Also if I’m making recommendations to our customers about adopting this, I would like for the motion to be, like, sustainable. One thing that sucks about hitting pg directly is that it does not give infracost a great incentive to maintain it. I’d love for there to be a more first-party solution that is easier for you to monetize because I do NOT want to tell people to get into an on-prem solution that is just going to get deprecated later.
Anyways food for thought happy to get on a call if helpful, but also not urgent or a thing we need or anything like that. Up to you
w
I assume your users don’t use Terraform so you need a cost estimation API? If so, this is the issue to subscribe to for updates https://github.com/infracost/infracost/issues/1525.
l
Some do, some don’t.
Yes makes sense.