From da5d2d838a15fc883009644810624799e854c901 Mon Sep 17 00:00:00 2001 From: ineszang44 Date: Tue, 22 Sep 2026 15:26:30 +0200 Subject: [PATCH] =?UTF-8?q?feat:=20saisie=20des=20logins=20pour=20acc?= =?UTF-8?q?=C3=A9der=20au=20vault?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- infra/terraform/environments/dev/main.tf | 16 ++++++++++++++++ infra/terraform/environments/dev/variables.tf | 12 ++++++++++++ 2 files changed, 28 insertions(+) diff --git a/infra/terraform/environments/dev/main.tf b/infra/terraform/environments/dev/main.tf index b8943ba..8d7c74b 100644 --- a/infra/terraform/environments/dev/main.tf +++ b/infra/terraform/environments/dev/main.tf @@ -10,3 +10,19 @@ module "k3s" { k3s_disable_components = var.k3s_disable_components kubeconfig_output_path = var.kubeconfig_output_path } + +provider "vault" { + # Adresse du serveur Vault (dev) + address = "https://10.101.200.37:8200" + + # Auth par userpass + auth_login { + path = "auth/userpass/login/${var.vault_username}" + parameters = { + login = var.vault_username + password = var.vault_password + } + } + # Skip verify pour dev uniquement (pas en prod!) + # skip_client_verification = true +} \ No newline at end of file diff --git a/infra/terraform/environments/dev/variables.tf b/infra/terraform/environments/dev/variables.tf index e6f20c2..16634ce 100644 --- a/infra/terraform/environments/dev/variables.tf +++ b/infra/terraform/environments/dev/variables.tf @@ -76,3 +76,15 @@ variable "deployment_environment" { error_message = "L'environnement doit ĂȘtre dev, rec ou prod." } } + +variable "vault_username" { + description = "Username Vault" + type = string + sensitive = false +} + +variable "vault_password" { + description = "Password Vault" + type = string + sensitive = true +}