From 124079816d6b67f0c8abd386b370820aefca4dee Mon Sep 17 00:00:00 2001 From: Nicolas Brieussel Date: Tue, 21 Jul 2026 16:17:03 +0200 Subject: [PATCH] feat: wire OpenBao KMS auto-unseal secrets on scaleway, add external-dns IAM - 02-cluster/scaleway: create the openbao namespace + scaleway-s3-credentials and openbao-unseal-aws secrets (mirrors 02-cluster/local), drop Infisical in favor of a plain argocd_admin_password_hash var - 04-dns/scaleway: new IAM root for the external-dns workload identity (DomainsDNSFullAccess, scoped to the project), output-only for now Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01CCgyeSfKWH6m5mmJEg6t43 --- 02-cluster/local/variables.tf | 12 ++-- 02-cluster/scaleway/argocd.tf | 16 ++--- 02-cluster/scaleway/main.tf | 39 ++++++++++++ 02-cluster/scaleway/variables.tf | 67 +++++++++++++++------ 02-cluster/scaleway/version.tf | 24 ++++---- 04-dns/scaleway/.terraform.lock.hcl | 69 ++++++++++++++++++++++ 04-dns/scaleway/env/04-dns-scaleway.tfvars | 3 + 04-dns/scaleway/main.tf | 36 +++++++++++ 04-dns/scaleway/outputs.tf | 10 ++++ 04-dns/scaleway/variables.tf | 10 ++++ 04-dns/scaleway/version.tf | 24 ++++++++ mise.toml | 1 + 12 files changed, 268 insertions(+), 43 deletions(-) create mode 100644 04-dns/scaleway/.terraform.lock.hcl create mode 100644 04-dns/scaleway/env/04-dns-scaleway.tfvars create mode 100644 04-dns/scaleway/main.tf create mode 100644 04-dns/scaleway/outputs.tf create mode 100644 04-dns/scaleway/variables.tf create mode 100644 04-dns/scaleway/version.tf diff --git a/02-cluster/local/variables.tf b/02-cluster/local/variables.tf index 6536812..1064c91 100644 --- a/02-cluster/local/variables.tf +++ b/02-cluster/local/variables.tf @@ -1,10 +1,10 @@ -variable "infisical_client_id" { - type = string -} +# variable "infisical_client_id" { +# type = string +# } -variable "infisical_client_secret" { - type = string -} +# variable "infisical_client_secret" { +# type = string +# } variable "gitops_revision" { type = string diff --git a/02-cluster/scaleway/argocd.tf b/02-cluster/scaleway/argocd.tf index 460d37c..389f747 100644 --- a/02-cluster/scaleway/argocd.tf +++ b/02-cluster/scaleway/argocd.tf @@ -1,8 +1,8 @@ -data "infisical_secrets" "this" { - env_slug = "staging" - workspace_id = "7ecb6ed4-058a-46cd-ac9f-7e792469cf0f" // project ID - folder_path = "/" -} +# data "infisical_secrets" "this" { +# env_slug = "staging" +# workspace_id = "7ecb6ed4-058a-46cd-ac9f-7e792469cf0f" // project ID +# folder_path = "/" +# } resource "helm_release" "argocd" { name = "argocd" @@ -21,9 +21,9 @@ resource "helm_release" "argocd" { set_sensitive = [{ name = "configs.secret.argocdServerAdminPassword" - # ArgoCD expects a bcrypt() hash here. bcrypt() would regenerate on every - # run, so we store the hash directly in Infisical to avoid spurious diffs. - value = data.infisical_secrets.this.secrets["ArgoCD_admin_encrypted"].value + # ArgoCD require a `bcrypt()` hashed password here. But `bcrypt` generate a new hash at each execution + # So instead, we store the hash directly, so terraform is not confused anymore by fake changes + value = var.argocd_admin_password_hash }] values = [<