You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PostgreSQL now supports scram-sha-256 as a password encryption mechanism. Sadly, the version of lib/pq that is currently used by Terraform as of today doesn't support this. However, lib/pq does support this in a newer version. This is actually a deal-breaker right now on databases that support this scheme as you'll get this when using PostgreSQL as a storage backend:
For others who have found this issue, a work around (without changing the PostgreSQL encryption mechanism back to md5 for the server), you can manually generate the md5 password:
tf@terraform:~$ echo -n passwordusername | md5sum
5a231fcdb710d73268c4f44283487ba2 -
...
edb=# alter role username password 'md55a231fcdb710d73268c4f44283487ba2';
ALTER ROLE
This is needed to make it possible to use the scram-sha-256
authentication method for the pg backend. It's not easy to write
unit-tests for this since it requires a specific configuration of the
PostgreSQL server, I did test it manually thought and everything seems
to work like it should.
Closeshashicorp#24016
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
ghost
locked as resolved and limited conversation to collaborators
Dec 12, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
PostgreSQL now supports scram-sha-256 as a password encryption mechanism. Sadly, the version of lib/pq that is currently used by Terraform as of today doesn't support this. However, lib/pq does support this in a newer version. This is actually a deal-breaker right now on databases that support this scheme as you'll get this when using PostgreSQL as a storage backend:
This is documented here. For reference: Terraform currently uses lib/pq version 1.0.0 but 1.1.0 added support for it.
It should, therefore, be as simple as bumping the minor version. I suggest going all the way up to the current version: 1.3.0
The text was updated successfully, but these errors were encountered: