Skip to content

Commit f42831c

Browse files
committed
cli/postgres add --schema flag instructions
1 parent 901dde6 commit f42831c

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

docs/operate/cli/reference/postgres.md

+8-3
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ nais postgres prepare appname --context dev-gcp --namespace dreamteam
3838

3939
## prepare
4040
Prepare will prepare the postgres instance by connecting using the
41-
application credentials and modify the permissions on the public schema.
41+
application credentials and by default modify the permissions on the public schema.
4242
All IAM users in your GCP project will be able to connect to the instance.
4343

44-
This operation is only required to run once for each postgresql instance.
44+
This operation is only required to run once for each postgresql instance and schema.
4545

4646
```bash
4747
nais postgres prepare appname
@@ -54,9 +54,10 @@ nais postgres prepare appname
5454
| Flag | Required | Short |Default |Description |
5555
|-----------|----------|-------|------------------------------|---------------------------------------------------------|
5656
| all-privs | No | | false | If true `ALL` is granted, else only `SELECT` is granted |
57+
| schema | No | | public | Name of the schema to grant access to |
5758

5859
## revoke
59-
Revokes the privileges given to the role cloudsqliamuser.
60+
Revokes the privileges given to the role cloudsqliamuser in the given schema (default `public`).
6061
Does not remove access for users to log in to the database or the `roles/cloudsql.admin` given to the user in GCP console.
6162

6263
This operation is only required to run once for each postgresql instance.
@@ -69,6 +70,10 @@ nais postgres revoke appname
6970
|-------------|-----------|-------------------------------------------------------------|
7071
| appname | Yes | Name of application owning the database |
7172

73+
| Flag | Required | Short |Default |Description |
74+
|-----------|----------|-------|--------|------------------------------------------|
75+
| schema | No | | public | Name of the schema to revoke access from |
76+
7277
## grant
7378
Grant yourself access to a Postgres database.
7479

0 commit comments

Comments
 (0)