Skip to content
Latchkey

Terraform Cloud cost estimation error in CI

HCP Terraform runs a cost-estimation stage between plan and policy on supported workspaces. It can error when a resource is not priceable or when a cost-based policy blocks the run for exceeding a budget threshold.

What this error means

A remote run shows a failed or errored cost-estimation stage, or a policy check tied to estimated monthly cost fails after the estimate is produced.

terraform
Cost estimation errored.

Unable to produce a cost estimate for one or more resources in this plan.

Common causes

A resource cannot be priced

Cost estimation supports specific providers and resource types. An unsupported or custom resource can leave the stage unable to complete.

A cost policy threshold was exceeded

A Sentinel/OPA policy that gates on estimated monthly cost fails when the plan pushes spend past the configured limit.

How to fix it

Read the cost stage detail

  1. Open the run and expand the cost estimation stage.
  2. For an errored estimate, note which resource could not be priced.
  3. For a policy failure, reduce the change or get an authorized override.

Adjust the plan or the cost policy

Bring estimated spend under the threshold, or update the cost policy limit if the budget legitimately changed.

How to prevent it

  • Know which resources cost estimation supports before relying on it.
  • Set realistic cost-policy thresholds per environment.
  • Review cost estimates in PRs so surprises surface before apply.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →