Problem
After upgrading an External Services instance of Terraform Enterprise to v202302-1 or a later version, the application fails to start. Logs from the tfe-postgresql-setup container show an error indicating an unsupported PostgreSQL version.
PostgreSQL version 11 does not meet PostgreSQL version requirements.
This validation error occurs before any database migrations, which allows you to safely reinstall the previous version of Terraform Enterprise while you plan the database upgrade.
Prerequisites
- Terraform Enterprise configured in External Services mode.
- An external PostgreSQL version 11 database instance.
- An attempt to upgrade to Terraform Enterprise
v202302-1or later.
Cause
PostgreSQL 11 reached its end-of-life (EOL) in November 2023. In accordance with this, Terraform Enterprise v202302-1 and later versions have dropped support for PostgreSQL 11 to ensure security and stability.
Solutions
Solution 1: Upgrade PostgreSQL (Recommended)
The permanent solution is to upgrade your external PostgreSQL instance to a supported version (e.g., 12, 13, 14, or 15) before upgrading Terraform Enterprise. You should follow the official PostgreSQL documentation for the upgrade procedure that best suits your environment.
After successfully upgrading your PostgreSQL instance, you can proceed with the Terraform Enterprise upgrade.
Solution 2: Temporarily Revert to a Previous Terraform Enterprise Version
If you cannot immediately upgrade your PostgreSQL database, you can revert your Terraform Enterprise installation to the version you were running prior to the upgrade attempt. This provides a stable environment while you plan the required database migration.
Ensure you reinstall the exact same version that was previously installed to prevent further complications.
Additional Information
- For more details on this change, please review the Terraform Enterprise v202302-1 Release Notes.