gorgeous-island-10432
03/20/2025, 5:45 PMwhite-airport-8778
gorgeous-island-10432
03/20/2025, 5:56 PMgorgeous-island-10432
03/20/2025, 5:57 PMgorgeous-island-10432
03/20/2025, 6:02 PMPLAN_URL="<https://app.terraform.io/api/v2/runs/${run_id}/plan>"
PLAN_JSON=$(curl -s -H "Authorization: Bearer ${TFC_TOKEN}" "${PLAN_URL}")
redacted_url=$(echo "${PLAN_JSON}" | jq -r '.data.links."json-output-redacted"')
if [[ -z "${redacted_url}" || "${redacted_url}" == "null" ]]; then
continue
fi
debug_echo "Downloading redacted JSON for plan ${run_id}..."
curl -s -L -H "Authorization: Bearer ${TFC_TOKEN}" "<https://app.terraform.io>${redacted_url}" -o "plan-${run_id}-redacted.json"
gorgeous-island-10432
03/20/2025, 6:02 PMgorgeous-island-10432
03/20/2025, 6:03 PMwhite-airport-8778
infracost breakdown --path=plan.json
using https://github.com/infracost/infracost/tree/master/examples/terraform and it worked fine, we also have many TFC RunTask users who don’t have this issue, so this might be related to the TFC plan JSON being different to what the TF CLI and RunTasks produces. Can you check the output of your file and compare it with the example plan.json in the above link, specially this part {"format_version":"0.2","terraform_version":"1.0.2","planned_values":{"root_module":{"resources":[{"address":
gorgeous-island-10432
03/20/2025, 6:08 PM{
"plan_format_version": "1.2",
"output_changes": {},
"resource_changes": [
{
"address": "azurerm_key_vault_secret.sql_admin_password",
"mode": "managed",
"type": "azurerm_key_vault_secret",
"name": "sql_admin_password",
"provider_name": "<http://registry.terraform.io/hashicorp/azurerm|registry.terraform.io/hashicorp/azurerm>",
"change": {
"actions": [
"no-op"
],
white-airport-8778
gorgeous-island-10432
03/20/2025, 6:10 PMgorgeous-island-10432
03/20/2025, 6:12 PMwhite-airport-8778
gorgeous-island-10432
03/20/2025, 6:13 PMwhite-airport-8778
gorgeous-island-10432
03/20/2025, 6:19 PMgorgeous-island-10432
03/20/2025, 6:21 PMgorgeous-island-10432
03/21/2025, 12:54 PMgorgeous-island-10432
03/21/2025, 12:55 PM"links": {
"self": "/api/v2/plans/plan-XXXXXXXXXXXXXX",
"json-output": "/api/v2/plans/plan-XXXXXXXXXXXXXX/json-output",
"json-output-redacted": "/api/v2/plans/plan-XXXXXXXXXXXXXX/json-output-redacted",
"json-schema": "/api/v2/plans/plan-XXXXXXXXXXXXXX/json-schema"
}
gorgeous-island-10432
03/21/2025, 12:55 PM