Sometimes when provisioning Terraform Enterprise ( TFE ) in an automated way the specified custom certificate has errors and TFE ends up with a self-signed certificate (from Replicated), and not with expected one. One of the most common cases is an incorrect host name inside the cert file.
- The following error message could be found in journal logs of the system :
certificate is valid for tfe.prod.example.com, not tfe.staging.example.com
And it simply means that the certificate is a valid one, but it is valid for another host
Replace certificate with the one corresponding to the hostname
After replacing the certificate with the correct one (see the articles below) you should have TFE loaded with the required SSL certificate.