From 5ff85b7fc54eacf2b194da5f0a959297661c2dbb Mon Sep 17 00:00:00 2001 From: Yasser Date: Thu, 7 Aug 2025 13:53:23 +0200 Subject: [PATCH 1/3] Output the Service Attachment links --- modules/postgresql/outputs.tf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/postgresql/outputs.tf b/modules/postgresql/outputs.tf index 2d1b28b0..daf86791 100644 --- a/modules/postgresql/outputs.tf +++ b/modules/postgresql/outputs.tf @@ -88,6 +88,12 @@ output "replicas_instance_server_ca_certs" { sensitive = true } +output "replicas_instance_psc_attachments" { + value = [for r in google_sql_database_instance.replicas : r.psc_service_attachment_link] + description = "The psc_service_attachment_links created for the replica instances" + sensitive = true +} + output "replicas_instance_service_account_email_addresses" { value = [for r in google_sql_database_instance.replicas : r.service_account_email_address] description = "The service account email addresses assigned to the replica instances" From f29945a8441f20bbb2ac7565e6dfee1e4dfa521c Mon Sep 17 00:00:00 2001 From: Yasser Date: Tue, 12 Aug 2025 09:38:32 +0200 Subject: [PATCH 2/3] Follow the same approach as is for master --- modules/postgresql/outputs.tf | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/postgresql/outputs.tf b/modules/postgresql/outputs.tf index daf86791..03c39616 100644 --- a/modules/postgresql/outputs.tf +++ b/modules/postgresql/outputs.tf @@ -91,7 +91,6 @@ output "replicas_instance_server_ca_certs" { output "replicas_instance_psc_attachments" { value = [for r in google_sql_database_instance.replicas : r.psc_service_attachment_link] description = "The psc_service_attachment_links created for the replica instances" - sensitive = true } output "replicas_instance_service_account_email_addresses" { From 869e06286403b54a476c8ccf3057a5eaa2a28419 Mon Sep 17 00:00:00 2001 From: "yasser.rasheed@schibsted.com" Date: Thu, 14 Aug 2025 17:06:55 +0200 Subject: [PATCH 3/3] Update the docs --- modules/postgresql/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/postgresql/README.md b/modules/postgresql/README.md index 8288c664..ea6b273e 100644 --- a/modules/postgresql/README.md +++ b/modules/postgresql/README.md @@ -209,6 +209,7 @@ module "pg" { | replicas | A list of `google_sql_database_instance` resources representing the replicas | | replicas\_instance\_connection\_names | The connection names of the replica instances to be used in connection strings | | replicas\_instance\_first\_ip\_addresses | The first IPv4 addresses of the addresses assigned for the replica instances | +| replicas\_instance\_psc\_attachments | The psc\_service\_attachment\_links created for the replica instances | | replicas\_instance\_self\_links | The URIs of the replica instances | | replicas\_instance\_server\_ca\_certs | The CA certificates information used to connect to the replica instances via SSL | | replicas\_instance\_service\_account\_email\_addresses | The service account email addresses assigned to the replica instances |