Organisations
Turn the HCP Terraform run task on
Makes the HMAC key HCP Terraform signs each request with, and the run task's own key its diagrams are published as.
POST
/orgs/{org}/hcp-terraform/run-taskTL;DR
| Question | Answer |
|---|---|
| What does it do? | Turn the HCP Terraform run task on. |
| What does it take? | org in the path. |
| What does it return? | Status 201 with a body of type RunTaskWithKey. |
| What can go wrong? | 401 not signed in; 403 the plan has no run task (plan.run_task_not_included), a member may not (orgs.forbidden), or the request came from an origin that may not make changes; 404 no such organisation, or the caller is not a member of it; 409 it is on already (run_task.already_on); 429 too many requests; 503 the server has no KEY_ENCRYPTION_SECRET, or the HMAC key can no longer be opened (run_task.unavailable); organisations are not set up on this server. Every failure uses the one error envelope. |
What it does
Makes the HMAC key HCP Terraform signs each request with, and the run task's own key its diagrams are published as. Answers the endpoint URL and the HMAC key to give HCP Terraform. The owner and an admin, on Pro and Enterprise.
Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
org | string | yes | The organisation's id or its slug. |
Responses
| Status | Meaning | Body |
|---|---|---|
| 201 | The run task, with its HMAC key. | RunTaskWithKey |
| 401 | Not signed in. | ErrorResponse |
| 403 | The plan has no run task (plan.run_task_not_included), a member may not (orgs.forbidden), or the request came from an origin that may not make changes. | ErrorResponse |
| 404 | No such organisation, or the caller is not a member of it. | ErrorResponse |
| 409 | It is on already (run_task.already_on). | ErrorResponse |
| 429 | Too many requests. | ErrorResponse |
| 503 | The server has no KEY_ENCRYPTION_SECRET, or the HMAC key can no longer be opened (run_task.unavailable); organisations are not set up on this server. | ErrorResponse |
Response body
A 201 answer has the type RunTaskWithKey.
| Field | Type | Required | Description |
|---|---|---|---|
active | boolean | yes | Whether the owner's plan includes the run task (Pro and Enterprise). While it does not, each run is reported as passed with a sentence, and nothing is drawn. |
plan | "free" | "pro" | "enterprise" | yes | |
enabled | boolean | yes | Whether the run task is on. |
endpoint | string | null | yes | The endpoint URL to give HCP Terraform, by the organisation id. Null on a server with no API_URL. |
keyLast4 | string | null | yes | The HMAC key's last four characters, or null while the run task is off. |
failOnError | boolean | yes | True when a run Plotwork cannot draw or keep is reported as failed. False (the default) reports it as passed, with a sentence. |
enabledAt | integer | null | yes | When it was turned on, in milliseconds since the epoch. |
enabledBy | object | null | yes | Who turned it on, or null when that account is gone. |
enabledBy.id | string | yes | |
enabledBy.email | string | yes | |
lastRunAt | integer | null | yes | When HCP Terraform last called it for a run, in milliseconds since the epoch, or null for never. |
lastStatus | "passed" | "failed" | null | yes | The status sent back to the last run. |
hmacKey | string | yes | The HMAC key to give HCP Terraform. Shown by this answer only; keep it out of logs and files. 64 hex characters. |
See also
| Doc | Why |
|---|---|
| API reference | Every endpoint, and the error envelope |
| Schemas | Every request and response type |
| Tool reference | The operations as callable tools |