Skip to content

Commit c00c576

Browse files
authored
Remove (most) default priveleges from public role (#3)
1 parent c0a3474 commit c00c576

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

roles.tf

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,17 @@ resource "postgresql_role" "role" {
3030
statement_timeout = 0
3131
}
3232

33+
resource "postgresql_grant" "public" {
34+
for_each = local.databases
35+
36+
database = each.value
37+
role = "public"
38+
schema = "public"
39+
object_type = "schema"
40+
privileges = ["CONNECT"]
41+
with_grant_option = false
42+
}
43+
3344
resource "postgresql_role" "role_ro" {
3445
for_each = local.databases
3546

0 commit comments

Comments
 (0)