From 00a838799b5124c8ff981be50ffee362de7775c4 Mon Sep 17 00:00:00 2001 From: Gabriel Radureau Date: Sun, 28 Jun 2026 17:05:50 +0200 Subject: [PATCH] =?UTF-8?q?feat(multi-env):=20Phase=20D1=20=E2=80=94=20pro?= =?UTF-8?q?vision=20erp-sandbox=20Postgres=20DB=20+=20role?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Activates the sandbox environment for the ERP on the Postgres side (ADR-0002 Phase D). `erp` gains `envs = ["prod", "sandbox"]`, so the elision flatten now materialises a second instance `erp-sandbox`: - database `erp-sandbox` - owner role `erp_sandbox_role` (snake-case per the convention) - pgbouncer user_lookup function + grants for the new DB The prod `erp` instance is unchanged (db `erp`, role `erp_role`) — the apply is purely additive (~6 resources for erp-sandbox, 0 changed, 0 destroyed on everything else). Verified the flatten output with a standalone tofu apply before pushing. This is D1 of the Phase D activation. D2 (tools Vault policies), D3 (erp iac creds + KV), D4 (ArgoCD Application) follow in order. Refs ADR-0002 (factory#15), Phase B (factory#16). Co-Authored-By: Claude Opus 4.7 (1M context) --- postgres/iac/terraform.tfvars | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postgres/iac/terraform.tfvars b/postgres/iac/terraform.tfvars index 694b8f0..faf1dd2 100644 --- a/postgres/iac/terraform.tfvars +++ b/postgres/iac/terraform.tfvars @@ -1,6 +1,6 @@ applications = [ { name = "webapp" }, - { name = "erp" }, + { name = "erp", envs = ["prod", "sandbox"] }, { name = "crowdsec" }, { name = "plausible" }, { name = "dance-lessons-coach" }, -- 2.49.1