From fbf13c1e68fb1bc41d42eac72e3216e4d43d36d1 Mon Sep 17 00:00:00 2001 From: "Matthew C. Morgan" Date: Mon, 10 Mar 2025 22:34:13 -0400 Subject: [PATCH] password handling --- README.md | 1 + keycloak-values.yaml.tmpl | 4 ++++ main.tf | 1 + variables.tf | 6 ++++++ 4 files changed, 12 insertions(+) diff --git a/README.md b/README.md index 38e7e8f..9e26efa 100644 --- a/README.md +++ b/README.md @@ -93,6 +93,7 @@ Common issues and solutions: | [cluster\_name](#input\_cluster\_name) | EKS cluster name name component used through out the EKS cluster describing its purpose (ex: dice-dev) | `string` | n/a | yes | | [default\_storage\_class](#input\_default\_storage\_class) | The default storage class to use for persistent volumes | `string` | `"gp3-encrypted"` | no | | [keycloak\_database](#input\_keycloak\_database) | The name of the database to create in the RDS instance. | `string` | `"bitnami_keycloak"` | no | +| [keycloak\_password](#input\_keycloak\_password) | The initial password for the database. | `string` | `"bn_keycloak"` | no | | [keycloak\_tag](#input\_keycloak\_tag) | The image tag associated with the keycloak\_chart\_version | `string` | `"22.0.1-debian-11-r30"` | no | | [keycloak\_user](#input\_keycloak\_user) | The username for the database. | `string` | `"bn_keycloak"` | no | | [namespace](#input\_namespace) | The namespace which will be created and into which keycloak will be deployed. | `string` | `"keycloak"` | no | diff --git a/keycloak-values.yaml.tmpl b/keycloak-values.yaml.tmpl index 0fb8367..beaa0c1 100644 --- a/keycloak-values.yaml.tmpl +++ b/keycloak-values.yaml.tmpl @@ -43,6 +43,10 @@ postgresql: repository: "${postgresql_image_repository}" tag: "${postgresql_image_tag}" enabled: true + auth: + username: ${keycloak_user} + password: ${keycloak_password} + database: ${keycloak_database} primary: resources: cpu: 100m diff --git a/main.tf b/main.tf index 93e3fb3..227bd18 100644 --- a/main.tf +++ b/main.tf @@ -26,6 +26,7 @@ resource "helm_release" "keycloak" { postgresql_image_tag = module.images.images[local.postgresql_key].tag, keycloak_database = var.keycloak_database, keycloak_user = var.keycloak_user, + keycloak_password = var.keycloak_password, })] depends_on = [ diff --git a/variables.tf b/variables.tf index 222f691..c53d4f5 100644 --- a/variables.tf +++ b/variables.tf @@ -38,6 +38,12 @@ variable "keycloak_user" { default = "bn_keycloak" } +variable "keycloak_password" { + description = "The initial password for the database." + type = string + default = "bn_keycloak" +} + variable "default_storage_class" { description = "The default storage class to use for persistent volumes" type = string