From f906e68554875bf5b00b1915fe462839bdbde3fa Mon Sep 17 00:00:00 2001 From: Vitomir Budimir Date: Tue, 9 Jul 2024 10:34:07 +0200 Subject: [PATCH] feat(editor): add mysql database url env var for lti integration --- envs/staging/editor.tf | 2 ++ modules/editor-as-lti-tool/main.tf | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/envs/staging/editor.tf b/envs/staging/editor.tf index f5e119b..243c2d7 100644 --- a/envs/staging/editor.tf +++ b/envs/staging/editor.tf @@ -6,6 +6,8 @@ module "editor" { dev_mode = true + mysql_database_url = "mysql://serlo:${var.athene2_database_password_default}@${module.mysql.database_private_ip_address}:3306/serlo" + lti_platform_client_id = var.editor_lti_platform_client_id } diff --git a/modules/editor-as-lti-tool/main.tf b/modules/editor-as-lti-tool/main.tf index 4b1127c..2fe1343 100644 --- a/modules/editor-as-lti-tool/main.tf +++ b/modules/editor-as-lti-tool/main.tf @@ -18,6 +18,10 @@ variable "dev_mode" { type = bool } +variable "mysql_database_url" { + type = string +} + variable "lti_platform_client_id" { type = string } @@ -76,6 +80,10 @@ resource "kubernetes_deployment" "editor_as_lti_tool" { name = "MONGODB_CONNECTION_URI" value = "mongodb://root:${random_password.mongodb_root_password.result}@${helm_release.database.name}:27017/?authSource=admin&readPreference=primary&ssl=false" } + env { + name = "MYSQL_URI" + value = var.mysql_database_url + } env { name = "LTI_PLATFORM_URL" value = local.lti_platform_url