Skip to content

Commit 603163b

Browse files
committed
Add instructions to connect to the db manually
1 parent 1b8b7b5 commit 603163b

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

docs/infrastructure/create-environment.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,3 +133,16 @@ Add the infrastructure secrets to the _inf_ key vault `kv-lungcs-[environment]-i
133133

134134
- assign yourself "Key Vault Secrets User" to application key vault to run the terraform code from the CLI inside the AVD when first trying to deploy the application.
135135
- assign yourself "Data Blob Reader" to State file storage account to run the terraform code from the CLI inside the AVD when first trying to deploy the application.
136+
137+
## Connect to Postgres Database
138+
139+
- Add your user as a memeber to the respective Entra ID group:
140+
- `postgres_lungcs_[environment]_uks_admin`
141+
- Log into the correct ADV for your environment type (either nonlive or live)
142+
- Run the following commands on the CLI to log into the database: -
143+
- `export PGPASSWORD="$(az account get-access-token --resource https://ossrdbms-aad.database.windows.net --query accessToken --output tsv)"`
144+
- `psql "host=postgres-lungcs-[environment]-uks.postgres.database.azure.com \
145+
port=5432 \
146+
dbname=[database] \
147+
user=postgres_lungcs_[environment]_uks_admin \
148+
sslmode=require"`

0 commit comments

Comments
 (0)