Skip to content

Commit 923b770

Browse files
authored
Fix: Postgres read-replica "psc_enabled" permadiff
1 parent f5ad3e6 commit 923b770

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/postgresql/read_replica.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ resource "google_sql_database_instance" "replicas" {
6464
}
6565
}
6666
dynamic "psc_config" {
67-
for_each = ip_configuration.value.psc_enabled ? ["psc_enabled"] : []
67+
for_each = ip_configuration.value.psc_enabled ? ["psc_enabled"] : ["psc_disabled"]
6868
content {
6969
psc_enabled = ip_configuration.value.psc_enabled
70-
allowed_consumer_projects = ip_configuration.value.psc_allowed_consumer_projects
70+
allowed_consumer_projects = ip_configuration.value.psc_enabled ? ip_configuration.value.psc_allowed_consumer_projects : []
7171
}
7272
}
7373
}

0 commit comments

Comments
 (0)