Problem
When setting TFE_DATABASE_PARAMETERS: "sslmode=disable" in docker-compose.yaml and PostgreSQL v15 Terraform Enterprise (TFE) Flexible Deployment Options (FDO) deployment fails
Error
[ERROR] terraform-enterprise: check failed: name=database duration=1m30.003031872s err=\"timeout: context deadline exceeded\"","component":"terraform-enterprise"}
[ERROR] terraform-enterprise: check failed: name=upgrade duration=1m30.00187011s err=\"timeout: context deadline exceeded\"","component":"terraform-enterprise"}
terraform-enterprise: the following startup checks failed: checks=[\"database\", \"upgrade\"]","component":"terraform-enterprise"}
Prerequisites
- Postgres 15
Cause
-
There were some changes between PostgreSQL 14 and PostgreSQL 15 where SSL mode is enabled by default with PostgreSQL 15, hence the TFE_DATABASE_PARAMETERS: "sslmode=disable" is not matching the Database setup and this should not be the case where we need to pass to the yaml file the same configuration of the database setup
Solutions:
- Solution 1
Setting TFE_DATABASE_PARAMETERS: "sslmode=require" will fix the issue if not possible check solution 2 -
Solution 2
Make sure from your AWS configurationrds.force_ssl
is set to 0 not 1
- Sign in to the AWS Management Console and open the Amazon RDS console at https://console.aws.amazon.com/rds/.
- In the navigation pane, choose Parameter groups.
- In the list, choose the parameter group that you want to modify.
- For Parameter group actions, choose Edit.
- Change the values of the parameter
rds.force_ssl
Please note that You can't change values in a default parameter group. So you might need to create a custom Parameter group and amend this parameter then it should be working fine