-
Hi, So doing hasura metadata export includes my database connection string including username/password, not really something I'd want to commit to source control. Any thoughts on this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi, 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
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". |
Beta Was this translation helpful? Give feedback.
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>
withthen 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".