tfctl run status
The tfctl run status command shows the status of a run, printing diagnostics if it failed.
Usage
$ tfctl run status ID [options]
Description
The tfctl run status command inspects an HCP Terraform run and prints its current status. If the run has errored, it renders all failures in the following order:
- Terraform diagnostics
- Policy check failures
- Run task failures
The command displays different information depending on the run status:
Successful runs: Displays a brief status message.Failed runs with diagnostics: DisplaysErrororWarning, error summary and details, file location and line number, and code snippet with the problematic configuration.Failed runs with policy checks: Displays policy set name, individual policy results, policy check logs, and overall result.Failed runs with task failures: Displays task name and status, task message and details URL, and overall result.
Arguments
ID: (Required) Run ID, workspace ID, or workspace name.
Flags
--organization=NAME: Organization name. Required when using a workspace name instead of ID.- Optional.
- Data type: string
- Default value: Auto-resolved from profile or Terraform cloud config
Options
All tfctl commands support options that control output formatting and CLI behavior. Refer to Global flags reference for the complete list of available options.
Exit codes
0: Run is successful or in progress6: Run has errored, policy soft failed, or policy override required
Examples
The following examples demonstrate how to check the status of a run.
Check status of a run by ID
The following example checks the status of a specific run using its run ID.
$ tfctl run status run-abc123
Check the latest run in a workspace by name
The following example checks the status of the latest run in a workspace using its name and organization.
$ tfctl run status my-workspace --organization my-org
Check the latest run in a workspace by ID
The following example checks the status of the latest run in a workspace using its workspace ID.
$ tfctl run status ws-abc123