Skip to content

hasura cli v2.0.0-alpha.1 - database metadata includes connection string #6596

Answered by ko-pp
neiled asked this question in General
Discussion options

You must be logged in to vote

Hi,
If you still have this issue, or for anyone else finding this thread while looking for a fix:

I searched for some time yesterday and found the answer on https://hasura.io/docs/latest/graphql/core/databases/connect-db.html#connect-a-database-v2-0-0-and-above -> CLI:

You can replace database_url: <DB_URL> with

database_url:
  from_env: <DB_URL_ENV_VAR>

then re-apply the metadata (make sure the env var is set beforehand in Hasura); the next time you export, it will stay like that, so you can commit without exposing the connection string.

If you add a new database from the console, you can directly select "Connect Database Via Environment Variable".

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@neiled
Comment options

Answer selected by neiled
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
General
Labels
None yet
2 participants