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 } } }