Terraform
- Terraform Enterprise
- 1.2.x
- 1.1.x
- 1.0.x
- v202507-1
- v202506-1
- v202505-1
- v202504-1
- v202503-1
- v202502-2
- v202502-1
- v202501-1
- v202411-2
- v202411-1
- v202410-1
- v202409-3
- v202409-2
- v202409-1
- v202408-1
- No versions of this document exist before v202408-1. Click below to redirect to the version homepage.
- v202407-1
- v202406-1
- v202405-1
- v202404-2
- v202404-1
- v202402-2
- v202402-1
- v202401-2
- v202401-1
- v202312-1
- v202311-1
- v202310-1
- v202309-1
- v202308-1
- v202307-1
- v202306-1
- v202305-2
- v202305-1
- v202304-1
- v202303-1
- v202302-1
- v202301-2
- v202301-1
- v202212-2
- v202212-1
- v202211-1
- v202210-1
- v202209-2
- v202209-1
- v202208-3
- v202208-2
- v202208-1
- v202207-2
- v202207-1
- v202206-1
Readiness endpoint
Terraform Enterprise provides two readiness endpoints that check if nodes are ready to accept requests. Both endpoints perform quick health checks of critical subsystems and return the current readiness status.
/api/v1/health/readiness: This endpoint checks readiness of a single node and is served on the application port. Because this endpoint targets a specific node, you should send the request directly to the node instead of through a load balancer. Refer to Check single-node readiness for details./api/v1/nodes/readiness: This endpoint checks the readiness of all active nodes in the deployment and is served on the admin console port. By default, the admin console port is8443. This endpoint requires authentication. Refer to Check multi-node readiness for details.
Check single-node readiness
This endpoint checks the readiness of the individual node that receives the request. Because this endpoint targets a specific node, you should send the request directly to the node instead of through a load balancer.
GET /api/v1/health/readiness
Query parameters
| Parameter | Type | Description |
|---|---|---|
timeout | integer | Optional. Timeout in seconds for the readiness check. Valid range is 1-30. Default is 1. |
Sample request
curl \
--request GET \
"https://tfe.example.com/api/v1/health/readiness?timeout=5"
Readiness registry checks
Both readiness endpoints check the following subsystems. For a complete list of Terraform Enterprise services, refer to the services reference.
| Subsystem | Description |
|---|---|
| Archivist | Ensures backend storage connectivity |
| Atlas | Validates Atlas Rails application health endpoint connectivity |
| Vault | Validates that Vault is initialized, sealed (or unsealed) and active |
| Database | Fast connectivity test to PostgreSQL (no version/extension validation, no retries) |
| Redis | Fast connectivity test to Redis (no retry, no validation) |
| Task Worker | Checks if task worker is in draining state |
| Disk | Verifies disk path exists and is accessible (disk operational mode only) |
Single-node response
The endpoint returns the readiness status in JSON format by default. For requests with Accept header containing text/plain or text/html, it returns plain text.
JSON response
| Attribute | Type | Description |
|---|---|---|
node | string | Name of the node that performed the check |
status | string | Overall readiness status: OK, ERROR, or DRAINING |
checks | array of objects | Detailed status for each subsystem check |
checks[].check | string | Name of the subsystem being checked |
checks[].status | string | Status of the check: OK or ERROR |
Sample JSON response
{
"node": "84ebea16aab1",
"status": "ERROR",
"checks": [
{
"check": "archivist",
"status": "OK"
},
{
"check": "atlas",
"status": "ERROR"
},
{
"check": "database",
"status": "OK"
},
{
"check": "disk",
"status": "OK"
},
{
"check": "redis",
"status": "OK"
},
{
"check": "task-worker",
"status": "ERROR"
},
{
"check": "vault",
"status": "OK"
}
]
}
Plain text response
Returns the overall status as plain text: OK, ERROR, or DRAINING.
Single-node response codes
| Status | Response | Reason |
|---|---|---|
| 200 | JSON API document or plain text | Terraform Enterprise is ready |
| 400 | JSON API error object error | Invalid timeout parameter |
| 503 | JSON API document or plain text | Terraform Enterprise is not ready or draining |
Check multi-node readiness
The multi-node readiness endpoint aggregates readiness check results from all active nodes in a Terraform Enterprise deployment. It returns node-level readiness status in a single authenticated request, so you do not need to query each node individually. Authentication is required to use this endpoint.
This endpoint is useful for monitoring deployment health and for powering the admin console system health overview.
GET /api/v1/nodes/readiness
Query parameters
| Parameter | Type | Description |
|---|---|---|
timeout | integer | Optional. Timeout in seconds for the readiness check. Valid range is 1-30. Default is 5. |
Sample request
curl \
--header "Authorization: Bearer $TOKEN" \
--request GET \
"https://tfe.example.com:8443/api/v1/nodes/readiness?timeout=5"
Sample response
[
{
"node": "node-id-1",
"status": "ERROR",
"checks": [
{
"check": "archivist",
"status": "ERROR"
},
{
"check": "atlas",
"status": "ERROR"
},
{
"check": "database",
"status": "OK"
},
{
"check": "redis",
"status": "OK"
},
{
"check": "task-worker",
"status": "OK"
},
{
"check": "vault",
"status": "OK"
}
]
},
{
"node": "node-id-2",
"status": "OK",
"checks": [
{
"check": "archivist",
"status": "OK"
},
{
"check": "atlas",
"status": "OK"
},
{
"check": "database",
"status": "OK"
},
{
"check": "redis",
"status": "OK"
},
{
"check": "task-worker",
"status": "OK"
},
{
"check": "vault",
"status": "OK"
}
]
}
]
Response attributes
The endpoint returns an array of readiness results. Each element represents one active node in the deployment.
| Attribute | Type | Description |
|---|---|---|
node | string | Identifier of the node |
status | string | Overall readiness status for the node: OK, ERROR, or DRAINING |
checks | array of objects | Detailed status for each subsystem check |
checks[].check | string | Name of the subsystem being checked |
checks[].status | string | Status of the check: OK or ERROR |
The status field reflects the highest severity across all subsystem checks for the node. ERROR takes precedence over DRAINING, which takes precedence over OK.
The response includes nodes that fail to execute readiness checks as well as the appropriate error information.
Response codes
| Status | Response | Reason |
|---|---|---|
| 200 | JSON API document | Readiness checks completed successfully |
| 400 | JSON API error object | Invalid request parameters, such as timeout out of range |
| 401 | JSON API error object | Authentication required |
| 503 | JSON API document | One or more nodes are not ready |
System API Overview
Terraform Enterprise Only: The System API is exclusive to Terraform Enterprise. It enables access to deployment configuration and data.
This API is distinct from the regular Admin API and the Backup and Restore API, with its own authentication mechanism.
Authentication
All system API endpoints require authentication with a bearer token generated using the tfectl admin api-token generate command. For more information on token creation and management, refer to the tfectl documentation.
Use the HTTP Header Authorization with the value Bearer <token>.
Rate Limiting
All System API endpoints are rate limited to 1 request per second per authentication token.
Port Configuration
By default, the System API is accessible on HTTPS port 8443. This port can be configured through the TFE_ADMIN_HTTPS_PORT environment variable in your deployment configuration.
Refer to Network settings in the configuration reference for more information about network configuration.
Versioning
The System API is versioned under the /api/v1 prefix and is separate from the main Terraform Enterprise API.
For example, if the API endpoint documentation defines the path /ping then the full path is /api/v1/ping.