Introduction
Problem
When using Terraform Enterprise with a CLI-driven workspace you get the following error during a plan or apply even though the run is executed and all seems to be working correct.
╷
│ Error: Failed to read JSON plan: GET https://<your_fqdn>/api/v2/plans/plan-rqvRmuvwnvmqqMCu/json-output-redacted giving up after 11 attempt(s)
│
│ Terraform Cloud returned an unexpected error. Sometimes this is caused by network connection problems, in which case you could retry the
│ command. If the issue persists please open a support ticket to get help resolving the problem.
Viewing it in the browser show you the following
{
"errors": [
{
"status": "500",
"title": "internal server error"
}
]
}
Prerequisites
- CLI-driven workspace
- Workspace -> General Settings -> User Interface -> Structured Run Output
- Terraform Enterprise is using self-signed certificates
Cause
Your Terraform Enterprise environment is using self-signed certificates and not all the root and intermediate certificates for the Terraform Enterprise environment have been added to the bundle.pem as documented here
Solutions:
Please verify all the root and intermediate certificates are added to your bundle.pem in your configuration files. It needs to be the fullchain for your Terraform Enterprise environment.
Outcome
The error message should not be seen.
Additional Information
-
Terraform TLS certificates documentation page here