ce7cb702218693d08ea6d83464d2457c9250027c
This commit is contained in:
commit
34c5f8963c
1 changed files with 145336 additions and 0 deletions
25
terraform/internal/postgres/forgejo-public.tf
Normal file
25
terraform/internal/postgres/forgejo-public.tf
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
resource "random_password" "forgejo_public" {
|
||||
length = 32
|
||||
special = false
|
||||
}
|
||||
|
||||
resource "postgresql_role" "forgejo_public" {
|
||||
name = "forgejo_public"
|
||||
login = true
|
||||
password = random_password.forgejo_public.result
|
||||
|
||||
lifecycle {
|
||||
ignore_changes = [password]
|
||||
}
|
||||
}
|
||||
|
||||
resource "postgresql_database" "forgejo_public" {
|
||||
name = "forgejo_public"
|
||||
owner = postgresql_role.forgejo_public.name
|
||||
}
|
||||
|
||||
resource "postgresql_grant_role" "vault_db_admin_forgejo_public" {
|
||||
role = postgresql_role.vault_db_admin.name
|
||||
grant_role = postgresql_role.forgejo_public.name
|
||||
with_admin_option = true
|
||||
}
|
||||
Loading…
Reference in a new issue