From 8975d8f08cb0c115e0776e99578a4ca6a6956c44 Mon Sep 17 00:00:00 2001 From: Clarissa Lima Borges Date: Tue, 21 May 2024 15:08:12 -0300 Subject: [PATCH] Make secret policy creation dependent on admin login (#4) The secrets that are created with the admin login for Postgres need to exist before we attach a policy to it. --- postgres.tf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/postgres.tf b/postgres.tf index 66672d9..e39674e 100644 --- a/postgres.tf +++ b/postgres.tf @@ -48,4 +48,6 @@ module "postgres_policy" { policy_name = "${local.instance_name}-postgres" role_names = [module.pod_role.name] secret_names = [module.postgres_admin_login[count.index].secret_name] + + depends_on = [module.postgres_admin_login] }