cyrilgdn / terraform-provider-postgresql

Terraform PostgreSQL provider
https://www.terraform.io/docs/providers/postgresql/
Mozilla Public License 2.0
355 stars 180 forks source link

Allow remote IP address to be overridden #437

Open davel opened 2 months ago

davel commented 2 months ago

Hello,

The postgresql client library provides a "hostaddr" feature, allowing you to override DNS. This is very useful if you wish to use SSL certificate verification but are connecting to your database indirectly.

https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNECT-HOSTADDR

This patch adds this feature. The pq library lacks support (https://github.com/lib/pq/issues/860) so I have implemented here inside the proxy wrapper. Please excuse any terrible Go, I am not a regular user!

All the best, Dave