From 8a373e9ba50e56b7e8a77f909a50c21701afddd4 Mon Sep 17 00:00:00 2001 From: bodymindarts Date: Wed, 24 Apr 2024 08:50:16 +0200 Subject: [PATCH] fix(postgresql): correct read_host --- modules/postgresql/gcp/outputs.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/postgresql/gcp/outputs.tf b/modules/postgresql/gcp/outputs.tf index ea3a5dbd..1827ad33 100644 --- a/modules/postgresql/gcp/outputs.tf +++ b/modules/postgresql/gcp/outputs.tf @@ -15,7 +15,7 @@ output "creds" { conn = "postgres://${module.database[db].user}:${module.database[db].password}@${google_sql_database_instance.instance.private_ip_address}:5432/${db}" read_conn = local.provision_read_replica ? "postgres://${module.database[db].user}:${module.database[db].password}@${google_sql_database_instance.replica[0].private_ip_address}:5432/${db}" : "" host = google_sql_database_instance.instance.private_ip_address - read_host = local.provision_read_replica ? google_sql_database_instance.instance.private_ip_address : "" + read_host = local.provision_read_replica ? google_sql_database_instance.replica[0].private_ip_address : "" } } sensitive = true