Skip to content
Connect an agent

Organisations

Receive a run of the HCP Terraform run task. Called by HCP Terraform, not by clients

Called by HCP Terraform.

POST/integrations/hcp-terraform/run-task/{org}

TL;DR

QuestionAnswer
What does it do?Receive a run of the HCP Terraform run task. Called by HCP Terraform, not by clients.
What does it take?A JSON body of type object.
What does it return?Status 200 with a body of type RunTaskAck.
What can go wrong?400 the body is not a run task payload (run_task.payload_invalid); 401 the signature is missing or does not match (run_task.signature_invalid); 404 the organisation has no run task turned on (run_task.not_found); 413 the body is larger than 64 KiB; 429 too many requests; 503 the run task is not available on this server (run_task.unavailable). Every failure uses the one error envelope.

What it does

Called by HCP Terraform. Checks X-TFC-Task-Signature over the exact bytes first and answers at once: verified for the address check made when the run task is created, accepted for a run, which is drawn into the organisation's library and reported back to the run's callback after the answer.

Path parameters

FieldTypeRequiredDescription
orgstringyesThe organisation's id, as the endpoint URL the portal shows names it.

Header parameters

FieldTypeRequiredDescription
x-tfc-task-signaturestringnoThe HMAC-SHA512 of the exact body under the run task's HMAC key, in hex. A request without it is refused.

Request body

The body has the type object.

FieldTypeRequiredDescription

Responses

StatusMeaningBody
200Verified, or accepted.RunTaskAck
400The body is not a run task payload (run_task.payload_invalid).ErrorResponse
401The signature is missing or does not match (run_task.signature_invalid).ErrorResponse
404The organisation has no run task turned on (run_task.not_found).ErrorResponse
413The body is larger than 64 KiB.ErrorResponse
429Too many requests.ErrorResponse
503The run task is not available on this server (run_task.unavailable).ErrorResponse

Response body

A 200 answer has the type RunTaskAck.

FieldTypeRequiredDescription
outcome"verified" | "accepted"yesverified: the address check HCP Terraform makes when the run task is created. accepted: a run, which is drawn and reported back after this answer.

See also

DocWhy
API referenceEvery endpoint, and the error envelope
SchemasEvery request and response type
Tool referenceThe operations as callable tools