Skip to main content
A resource running outside a supported cloud has no instance type, region or provider ID for CostGraph to price against. Instead of inventing those, tag the resource with the ID of a rate you registered in the pricing marketplace. A pricing ID is per dimension, so one object can carry a compute rate and a storage rate at the same time:

Dimensions

A key with no suffix is read as .compute on a node and .storage on a volume. Prefer the explicit suffix.

Register a rate

Full request and response schema: Register a custom provider for compute, and Register a custom disk provider for storage.
A disk rate takes capacity bounds instead of CPU and memory:
The response carries an id for each entry. That UUID is what you tag with.

Tag the resource

On Kubernetes, use labels:
Review what is tagged with:
Everywhere else, use the provider’s resource tags with the same key and value. A tagged resource needs no other metadata. CPU and memory still come from the node’s capacity, and volume size from the PV, because those are the billed quantities.

Tag keys on each provider

Not every provider accepts the canonical key verbatim. CostGraph matches keys case-insensitively after replacing /, . and - with _, so the alias your provider allows resolves to the same pin. Azure tag names reject /. GCP label keys allow only lowercase letters, digits, - and _, and must start with a letter.

Inheritance

A pin applies to the object that carries it and to everything under it that has no nearer pin of the same dimension. Tag a node and its pods inherit the compute rate; tag one namespace differently and only that namespace changes. The nearest pin wins.

What a pin changes

A pin sets ListCost: the rate you would be charged at list. It never overwrites BilledCost, which comes from an ingested bill. On a resource with no bill behind it, such as a bare-metal node, ListCost is the only cost there is. On a resource that is also billed, you get both, and the difference is your discount. Pins never double-count against an invoice.

Change a rate

Re-POST the same entry with a new cost_per_hour. The ID is unchanged and every tagged resource picks up the new rate from the next hour. Already-billed hours keep the rate they were billed at.
Changing region, instance_type or period_billing_hours creates a new rate with a new ID, because those describe a different SKU. Re-tag the affected resources with the new ID.

Share a rate

Anyone holding the ID can tag with it, which is how a provider prices the clusters they sell to. Only your own organisation’s rates are listed back to you, so treat an ID as a secret you hand out deliberately.

Fix a mistake

Re-tag with the correct ID and the change applies on the next sync. Remove a Kubernetes label with a trailing hyphen:
Removing the tag removes the pin. The resource falls back to a pin inherited from an ancestor, then to normal attribute matching. If the ID is malformed, or names a rate that has been deleted, CostGraph logs a warning naming the resource and the value, and leaves that dimension unpriced. It never falls back to attribute matching to cover for a bad ID.