cancel_run
Stop an in-progress Terraform Cloud run during planning or applying phases. Gracefully interrupts the process, cleans up resources, and logs the cancellation with an optional comment for audit purposes.
Instructions
Cancel a run that is currently planning or applying
Gracefully stops an in-progress run during planning or applying phases. Use this when you need to stop a run that's taking too long, consuming too many resources, or needs to be stopped for any reason. The operation attempts to cleanly terminate the run by sending an interrupt signal.
API endpoint: POST /runs/{run_id}/actions/cancel
Args: run_id: The ID of the run to cancel (format: "run-xxxxxxxx") comment: An optional explanation for why the run was canceled
Returns: Run status update with canceled state, timestamp of cancellation, and any provided comment in the response metadata
See: docs/tools/run.md for reference documentation
Input Schema
Name | Required | Description | Default |
---|---|---|---|
comment | No | ||
run_id | Yes |