for cluster-based Postgres instance lib/pq supports master discovery through specifying multiple hosts in the connection string. For example, to connect to my instance with psql I use the following command
when creating resources with such configuration, I get the following error
Error: error detecting capabilities: error PostgreSQL version: dial tcp: lookup host1.mydomain,host2.mydomain: no such host
Note that the configuration works as intended if I manually find the master and only specify one host.
for cluster-based Postgres instance lib/pq supports master discovery through specifying multiple hosts in the connection string. For example, to connect to my instance with
psql
I use the following commandpsql
automatically detects the current master and connects to it, however this does not work with the providerTerraform Configuration Files
when creating resources with such configuration, I get the following error
Error: error detecting capabilities: error PostgreSQL version: dial tcp: lookup host1.mydomain,host2.mydomain: no such host
Note that the configuration works as intended if I manually find the master and only specify one host.