Looking to configure database secret engine in vault using postgresql.
Used docker-compose.yml to built vault and create postgres services.
both services are up and running and I was able to connect postgres DB using local psql installation on mac. Both postgres and vault containers are up.
Configuring Vault with the proper plugin and connection information fails with this error.
bash-4.4# vault write dbs/config/postgres plugin_name=postgresql-database-plugin allowed_roles="readonly" connection_url="postgresql://vc:[email protected]:5432/postgres?sslmode=disable"
Erro message is below:
Error writing data to dbs/config/postgres: Error making API request.
URL: PUT http://127.0.0.1:8200/v1/dbs/config/postgres Code: 400. Errors:
- error creating database object: error verifying connection: dial tcp 127.0.0.1:5432: connect: connection refused