fixed gluetun issue
This commit is contained in:
@@ -17,7 +17,7 @@ provider "kubernetes" {
|
||||
provider "bitwarden-secrets" {
|
||||
api_url = "https://bitwarden.tryton.geeraert.eu/api"
|
||||
identity_url = "https://bitwarden.tryton.geeraert.eu/identity"
|
||||
access_token = "0.dd9b243a-b5f5-4b26-aaba-b3f70170088c.fjoaQEShPaEEZa7GmkTJXQYEmF5wVp:5B4jhLp5gRymNcwktMDyOg=="
|
||||
access_token = "0.7720f24b-4328-41ef-b70b-b419018270a3.nhBoRMSkfrlxqJVZ9W0W1g3lNFrmfI:35muVQz2mO3coR46bIZgcQ=="
|
||||
organization_id = "a6361589-badd-4bde-9cb4-af8901161c0d"
|
||||
}
|
||||
|
||||
@@ -60,6 +60,8 @@ variable "kubernetes" {
|
||||
liveness_http_get = optional(string)
|
||||
liveness_http_get_path = optional(string)
|
||||
database = optional(map(string))
|
||||
database_command = optional(list(string))
|
||||
database_args = optional(list(string))
|
||||
redis = optional(map(string))
|
||||
enabled = optional(bool, true)
|
||||
secret_ref = optional(list(string))
|
||||
@@ -589,6 +591,7 @@ resource "kubernetes_deployment_v1" "automatic" {
|
||||
}
|
||||
}
|
||||
}
|
||||
depends_on = [kubernetes_persistent_volume_claim_v1.automatic-pvc]
|
||||
}
|
||||
|
||||
|
||||
@@ -650,7 +653,7 @@ resource "kubernetes_deployment_v1" "database-automatic" {
|
||||
}
|
||||
|
||||
command = try([each.value.database.command], [])
|
||||
#command = [try(each.value.database.command,"")]
|
||||
args = each.value.database_args != null ? each.value.database_args : []
|
||||
|
||||
dynamic "env_from" {
|
||||
for_each = each.value.database != null && each.value.enabled == true && !(try(each.value.database.shunt, false)) ? ["${each.key}-db-terraform"] : []
|
||||
@@ -973,6 +976,7 @@ resource "kubernetes_secret_v1" "automatic-database-secret" {
|
||||
PGDATABASE = "${resource.bitwarden-secrets_secret.automatic_bitwarden_secret_db_name[each.key].value}"
|
||||
DB_HOST = "${resource.bitwarden-secrets_secret.automatic_bitwarden_secret_db_host[each.key].value}"
|
||||
PGHOST = "${resource.bitwarden-secrets_secret.automatic_bitwarden_secret_db_host[each.key].value}"
|
||||
POSTGRES_HOST = "${resource.bitwarden-secrets_secret.automatic_bitwarden_secret_db_host[each.key].value}"
|
||||
DB_PASSWORD = "${resource.bitwarden-secrets_secret.automatic_bitwarden_secret_db_password[each.key].value}"
|
||||
MYSQL_PASSWORD = "${resource.bitwarden-secrets_secret.automatic_bitwarden_secret_db_password[each.key].value}"
|
||||
MYSQL_ROOT_PASSWORD = "${resource.bitwarden-secrets_secret.automatic_bitwarden_secret_db_password[each.key].value}"
|
||||
@@ -982,7 +986,7 @@ resource "kubernetes_secret_v1" "automatic-database-secret" {
|
||||
POSTGRES_USER = "${resource.bitwarden-secrets_secret.automatic_bitwarden_secret_db_username[each.key].value}"
|
||||
MYSQL_USER = "${resource.bitwarden-secrets_secret.automatic_bitwarden_secret_db_username[each.key].value}"
|
||||
PGUSER = "${resource.bitwarden-secrets_secret.automatic_bitwarden_secret_db_username[each.key].value}"
|
||||
|
||||
DATABASE_URL = "postgresql://${resource.bitwarden-secrets_secret.automatic_bitwarden_secret_db_username[each.key].value}:${resource.bitwarden-secrets_secret.automatic_bitwarden_secret_db_password[each.key].value}@${resource.bitwarden-secrets_secret.automatic_bitwarden_secret_db_host[each.key].value}:${resource.bitwarden-secrets_secret.automatic_bitwarden_secret_db_port[each.key].value}/${resource.bitwarden-secrets_secret.automatic_bitwarden_secret_db_name[each.key].value}"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user