From 98210d0a02bee1fea82e4e48f833d2490af9d35e Mon Sep 17 00:00:00 2001 From: "Kelvin V. Soares" Date: Fri, 1 Aug 2025 15:11:20 -0300 Subject: [PATCH] fix: revert psc_config workaround - causes permanent drift --- modules/postgresql/read_replica.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/postgresql/read_replica.tf b/modules/postgresql/read_replica.tf index 3cae2aa1..8a9b2dc4 100644 --- a/modules/postgresql/read_replica.tf +++ b/modules/postgresql/read_replica.tf @@ -63,10 +63,10 @@ resource "google_sql_database_instance" "replicas" { } } dynamic "psc_config" { - for_each = ip_configuration.value.psc_enabled ? ["psc_enabled"] : ["psc_disabled"] + for_each = ip_configuration.value.psc_enabled ? ["psc_enabled"] : [] content { psc_enabled = ip_configuration.value.psc_enabled - allowed_consumer_projects = ip_configuration.value.psc_enabled ? ip_configuration.value.psc_allowed_consumer_projects : [] + allowed_consumer_projects = ip_configuration.value.psc_allowed_consumer_projects } } }