From c158dffcc93410c2640146ac4d6485a7510ac975 Mon Sep 17 00:00:00 2001 From: "pi-ux-ce@ARES" Date: Tue, 13 Oct 2026 17:26:10 +0100 Subject: [PATCH] beginning of modules --- core/ingress.tf | 5 +++++ infrastructure/database.tf | 2 +- infrastructure/module.tf | 4 ++-- infrastructure/variables.auto.tfvars | 1 + modules/ingress.tf | 14 ++++++++++++++ 5 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 modules/ingress.tf diff --git a/core/ingress.tf b/core/ingress.tf index a313a75..f27f701 100644 --- a/core/ingress.tf +++ b/core/ingress.tf @@ -1,3 +1,8 @@ +module "import_output" { + source = "../modules" + hello = "coucou" +} + resource "helm_release" "cert_manager" { name = "cert-manager" repository = "oci://quay.io" diff --git a/infrastructure/database.tf b/infrastructure/database.tf index 0f29fd3..716c605 100644 --- a/infrastructure/database.tf +++ b/infrastructure/database.tf @@ -131,7 +131,7 @@ resource "kubernetes_deployment_v1" "database-automatic" { name = "${each.key}-db-backup" host_path { - path = join("/", [var.storage_path.fast_access,"Backup", coalesce(each.value.namespace, each.value.connected_namespace, each.key), "${each.key}-db-backup"]) + path = join("/", [var.storage_path.fast_access, "Backup", coalesce(each.value.namespace, each.value.connected_namespace, each.key), "${each.key}-db-backup"]) } } } diff --git a/infrastructure/module.tf b/infrastructure/module.tf index 9780760..eefc6e0 100644 --- a/infrastructure/module.tf +++ b/infrastructure/module.tf @@ -23,9 +23,9 @@ provider "bitwarden-secrets" { variable "kubernetes" { type = map(object({ - name = optional(string) + name = optional(string) docker = optional(bool) - image = string + image = string pvc = optional(map(object({ name = optional(string) pvc = optional(bool, false) diff --git a/infrastructure/variables.auto.tfvars b/infrastructure/variables.auto.tfvars index b5f00fb..0846747 100644 --- a/infrastructure/variables.auto.tfvars +++ b/infrastructure/variables.auto.tfvars @@ -5,6 +5,7 @@ kubernetes = { dns_nameservers = "1.1.1.1" replicas = 01 image = "qmcgaw/gluetun:latest" + exposed = false service_port = [8888] #extra_manifest = ["/opt/kubernetes/Terraform_kube/external_manifests/gluetun/gluetun-secret-netherlandNL-FREE-280.yaml"] secret_import = ["5527ba11-07e3-415b-8d1f-b3ee0154eb56", "b0d22160-d81a-4702-a3dd-b40e0168d617", "643dbe99-ace0-4ef5-8a2e-b44f014dccb0"] diff --git a/modules/ingress.tf b/modules/ingress.tf new file mode 100644 index 0000000..a715541 --- /dev/null +++ b/modules/ingress.tf @@ -0,0 +1,14 @@ +variable "hello" { + type = string +} + +output "instance_id" { + description = "ID of the EC2 instance" + value = var.hello +} + +resource "null_resource" "test_module_linkage" { + triggers = { + passed_value = var.hello + } +}