diff --git a/terraform/main.tf b/terraform/main.tf index 1040c2d..9532a89 100644 --- a/terraform/main.tf +++ b/terraform/main.tf @@ -14,6 +14,8 @@ module "ssrc-jupyter-dept" { public_key_openssh = var.public_key_openssh + z2jupyterhub_version = "3.3.8" + aad_client_id = var.aad_client_id aad_client_secret = var.aad_client_secret aad_tenant_id = var.aad_tenant_id diff --git a/terraform/modules/jupyter/install_jupyterhub.sh b/terraform/modules/jupyter/install_jupyterhub.sh index 6251e9e..aeb695f 100644 --- a/terraform/modules/jupyter/install_jupyterhub.sh +++ b/terraform/modules/jupyter/install_jupyterhub.sh @@ -7,9 +7,9 @@ curl https://raw.githubusercontent.com/helm/helm/HEAD/scripts/get-helm-3 | bash helm repo add jupyterhub https://hub.jupyter.org/helm-chart/ helm repo update helm upgrade --cleanup-on-fail \ - --install demo jupyterhub/jupyterhub \ + --install jupyterhub jupyterhub/jupyterhub \ --namespace jupyterhub --create-namespace \ - --version=3.3.7 \ + --version=${z2jupyterhub_version} \ --values jupyterhub_config.yaml kubectl config set-context $(kubectl config current-context) --namespace jupyterhub diff --git a/terraform/modules/jupyter/main.tf b/terraform/modules/jupyter/main.tf index f88efe6..3ea58ee 100644 --- a/terraform/modules/jupyter/main.tf +++ b/terraform/modules/jupyter/main.tf @@ -25,7 +25,12 @@ resource "harvester_cloudinit_secret" "cloud-config-jupyter" { } ) ) - install_jupyterhub_script = indent(6, file("${path.module}/install_jupyterhub.sh")) + install_jupyterhub_script = indent(6, templatefile( + "${path.module}/install_jupyterhub.sh", + { + z2jupyterhub_version = var.z2jupyterhub_version + } + )) }) } diff --git a/terraform/modules/jupyter/variables.tf b/terraform/modules/jupyter/variables.tf index 9b43a98..42cf312 100644 --- a/terraform/modules/jupyter/variables.tf +++ b/terraform/modules/jupyter/variables.tf @@ -59,4 +59,9 @@ variable "aad_client_secret" { variable "aad_tenant_id" { type = string +} + +variable "z2jupyterhub_version" { + type = string + description = "Version of the z2jupyterhub helm chart" } \ No newline at end of file diff --git a/terraform/variables.tf b/terraform/variables.tf index b373e6c..aa836f5 100644 --- a/terraform/variables.tf +++ b/terraform/variables.tf @@ -14,4 +14,4 @@ variable "aad_client_secret" { variable "aad_tenant_id" { type = string -} \ No newline at end of file +}