Problem
Cost estimation fails with the error “Something on our end went wrong. We’ve been notified. Please try again later.”
Cause
There are several causes to this issue some of which include expired cloud provider credentials or a panic caused by a runtime error.
Solution
To identify the cause of cost estimation failure, use the get run details API endpoint with the ?include=cost_estimate
includes parameter. This will return any cost estimation errors that occurred during the run.
Gather the run ID.
Adjust the following request with the run ID and hostname (for Terraform Cloud, this should be
app.terraform.io
), then query the endpoint or paste the URL in your browser.$ curl \ --header "Authorization: Bearer $TOKEN" \ "https://$TFEHOSTNAME/api/v2/runs/$RUNID?include=cost_estimate"
Locate the
included
section and review the cost estimateerror message
.Example:
"included": [ { "id": "ce-cGoqimyNs2Y8rczy", "type": "cost-estimates", "attributes": { "error-message": "panic: didn't find any prices for PremiumContainer Plan | PC2 in EU West\n\ngoroutine 19 [running]:\ngithub.com/hashicorp/cost-estimation/internal/pkg/azure.(*ASPlan).Price(0xc0004337a0, 0xbf5cd0, 0x4, 0x0)\n\t/go/src/tfce/internal/pkg/azure/appservice.go:190 +0x857\ngithub.com/hashicorp/cost-estimation/internal/pkg/graph.(*Graph).Walk.func1(0x111bcd8, 0x0, 0x0, 0xc0005401f8, 0x1, 0x1)\n\t/go/src/tfce/internal/pkg/graph/graph.go:168 +0x2fb\ngithub.com/hashicorp/cost-estimation/internal/pkg/graph.(*Graph).Walk(0xc000433050, 0xc000db3d48)\n\t/go/src/tfce/internal/pkg/graph/graph.go:181 +0xf7\ngithub.com/hashicorp/cost-estimation/internal/pkg/estimator.(*Driver).buildMatchSet(0xc000505860, 0xc0004321e0, 0xd07d20, 0xc000e020c0, 0xc000e020c0)\n\t/go/src/tfce/internal/pkg/estimator/driver.go:43 +0x1db\ngithub.com/hashicorp/cost-estimation/internal/pkg/estimator.(*Driver).Do(0xc000505860, 0xcf7f00)\n\t/go/src/tfce/internal/pkg/estimator/driver.go:67 +0xcd\ngithub.com/hashicorp/cost-estimation/internal/app/tfce.(*Application).runEstimator(0xc0002a7040, 0xd004c0, 0xc0000a8000, 0x0, 0x0)\n\t/go/src/tfce/internal/app/tfce/tfce.go:174 +0x7db\ngithub.com/hashicorp/cost-estimation/internal/app/tfce.(*Application).Main.func2(0xc00041a000, 0xc0002a7040, 0xd004c0, 0xc0000a8000)\n\t/go/src/tfce/internal/app/tfce/tfce.go:107 +0x3f\ncreated by github.com/hashicorp/cost-estimation/internal/app/tfce.(*Application).Main\n\t/go/src/tfce/internal/app/tfce/tfce.go:106 +0x159\n", "status": "errored", "status-timestamps": { "queued-at": "2020-12-07T17:21:31+00:00", "errored-at": "2020-12-07T17:21:45+00:00" }
Resolve any conflicts.
Additional Information
If a panic is returned then submit a support ticket to HashiCorp Support with the run detail output.