Terraform Enterprise (TFE) or Terraform Cloud (TFC) runs fail with the error below in workspaces configured against self-hosted agents.
2023-05-01T19:25:08.672Z [INFO] core: Job received: job.type=apply job.id=run-xxxxxxx
2023-05-01T19:25:08.889Z [ERROR] agent: Failed handling job:
| failed decoding run: 1 error(s) decoding:
| * '' has invalid keys: runtime_report_url
Prerequisites (if applicable)
- TFE or TFC self-hosted agents versions 1.7.0 and earlier will report this error
- The run will hang in the apply state with either an
undefinedentry or no text written in the workspace raw log
- The agent has run into a known bug conflicting when decoding runs for assessments that will produce the error reported
- The defect affects self-hosted agents versions 1.7.0 and below
This has been addressed in the agent binary versions starting at 1.7.1.
Updating the agent binary to the 1.7.1 version or newer should resolve the issue, as the fix should be included in the new releases.
The agent binaries are available at https://releases.hashicorp.com/tfc-agent/ for download.
Once the agents are updated, you would need to cancel the currently affected runs where the apply is stuck, and then retry the runs against the agent version that includes the fix.
- For additional assistance please contact HashiCorp Support.