Skip to main content
CostGraph serves the pricing requests the Infracost CLI makes. Point the CLI at CostGraph and its estimates use the prices you pay, not list prices.

Before you begin

  • A CostGraph API key with the pricing:read scope. Create one in Settings > API keys.
  • An Infracost API key, to price AWS, Azure, and Google Cloud resources. Without one, see Without an Infracost key.

Connect your Infracost key

In CostGraph, open Integrations, choose Infracost, and paste the API key your Infracost CLI already uses. Print it with infracost configure get api_key. Connecting a new key replaces the old one. You need to be an organization owner, admin, or billing admin.

Point the CLI at CostGraph

Set two environment variables before you run infracost. The value is your CostGraph API key, not your Infracost key.
Run infracost breakdown as usual.

What changes

AWS, Azure, and Google Cloud prices come from Infracost with your key. Other providers come from CostGraph prices. Prices reflect what your bill shows you pay for each SKU over the last 30 days. SKUs you haven’t used yet show list price. Bill-rate adjustment applies to AWS. Azure and Google Cloud show list price.

Without an Infracost key

AWS, Azure, and Google Cloud lines are priced from CostGraph prices where CostGraph has the exact item. Other lines show as not found.

Errors