fix
This commit is contained in:
@@ -64,6 +64,11 @@ resource "postgresql_role" "owner" {
|
|||||||
name = "${local.sorted-dbs[count.index].name}"
|
name = "${local.sorted-dbs[count.index].name}"
|
||||||
login = true
|
login = true
|
||||||
password = data.kubernetes_secret_v1.password_get[count.index].data["POSGRESQL_PASSWORD"]
|
password = data.kubernetes_secret_v1.password_get[count.index].data["POSGRESQL_PASSWORD"]
|
||||||
|
lifecycle {
|
||||||
|
ignore_changes = [
|
||||||
|
roles,
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "postgresql_database" "my_db" {
|
resource "postgresql_database" "my_db" {
|
||||||
|
|||||||
@@ -6,6 +6,26 @@ metadata:
|
|||||||
name: dataset-pg
|
name: dataset-pg
|
||||||
description: null
|
description: null
|
||||||
options:
|
options:
|
||||||
|
issuer:
|
||||||
|
default: letsencrypt-prod
|
||||||
|
examples:
|
||||||
|
- letsencrypt-prod
|
||||||
|
type: string
|
||||||
|
ingress-class:
|
||||||
|
default: traefik
|
||||||
|
examples:
|
||||||
|
- traefik
|
||||||
|
type: string
|
||||||
|
storage:
|
||||||
|
default: 8Gi
|
||||||
|
examples:
|
||||||
|
- 8Gi
|
||||||
|
type: string
|
||||||
|
replicas:
|
||||||
|
default: 1
|
||||||
|
examples:
|
||||||
|
- 1
|
||||||
|
type: integer
|
||||||
extentions:
|
extentions:
|
||||||
default:
|
default:
|
||||||
pool:
|
pool:
|
||||||
@@ -112,20 +132,15 @@ options:
|
|||||||
type: object
|
type: object
|
||||||
type: object
|
type: object
|
||||||
type: object
|
type: object
|
||||||
databases:
|
roles:
|
||||||
default: []
|
default: []
|
||||||
items:
|
items:
|
||||||
properties:
|
properties:
|
||||||
name:
|
name:
|
||||||
default: db
|
default: alt-account
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
type: array
|
type: array
|
||||||
ingress-class:
|
|
||||||
default: traefik
|
|
||||||
examples:
|
|
||||||
- traefik
|
|
||||||
type: string
|
|
||||||
backups:
|
backups:
|
||||||
default:
|
default:
|
||||||
enable: false
|
enable: false
|
||||||
@@ -180,35 +195,20 @@ options:
|
|||||||
default: backup-settings
|
default: backup-settings
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
|
databases:
|
||||||
|
default: []
|
||||||
|
items:
|
||||||
|
properties:
|
||||||
|
name:
|
||||||
|
default: db
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
type: array
|
||||||
sub-domain:
|
sub-domain:
|
||||||
default: dataset-pg
|
default: dataset-pg
|
||||||
examples:
|
examples:
|
||||||
- dataset-pg
|
- dataset-pg
|
||||||
type: string
|
type: string
|
||||||
replicas:
|
|
||||||
default: 1
|
|
||||||
examples:
|
|
||||||
- 1
|
|
||||||
type: integer
|
|
||||||
issuer:
|
|
||||||
default: letsencrypt-prod
|
|
||||||
examples:
|
|
||||||
- letsencrypt-prod
|
|
||||||
type: string
|
|
||||||
storage:
|
|
||||||
default: 8Gi
|
|
||||||
examples:
|
|
||||||
- 8Gi
|
|
||||||
type: string
|
|
||||||
roles:
|
|
||||||
default: []
|
|
||||||
items:
|
|
||||||
properties:
|
|
||||||
name:
|
|
||||||
default: alt-account
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
type: array
|
|
||||||
domain-name:
|
domain-name:
|
||||||
default: your_company.com
|
default: your_company.com
|
||||||
examples:
|
examples:
|
||||||
|
|||||||
@@ -47,3 +47,9 @@ resource "postgresql_role" "role" {
|
|||||||
login = true
|
login = true
|
||||||
password = data.kubernetes_secret_v1.password_role_get[count.index].data["POSGRESQL_PASSWORD"]
|
password = data.kubernetes_secret_v1.password_role_get[count.index].data["POSGRESQL_PASSWORD"]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resource "postgresql_grant_role" "anomynous" {
|
||||||
|
count = var.extentions.postgrest.enable?1:0
|
||||||
|
role = "${var.instance}"
|
||||||
|
grant_role = "anomynous"
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user