Skip to content

Add support for allow_psc_global_access in variable psc_addresses in module net-address #2479

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
juliocc opened this issue Aug 7, 2024 Discussed in #2478 · 0 comments · Fixed by #2480
Closed

Add support for allow_psc_global_access in variable psc_addresses in module net-address #2479

juliocc opened this issue Aug 7, 2024 Discussed in #2478 · 0 comments · Fixed by #2480
Assignees

Comments

@juliocc
Copy link
Collaborator

juliocc commented Aug 7, 2024

Discussed in #2478

Originally posted by joe-flumen August 7, 2024
Hi,

I was creating private service connection, but the field allow_psc_global_access was missing from the psc_addresses variable.

I used this diff to add it to net-address module.

diff --git a/modules/net-address/psc.tf b/modules/net-address/psc.tf
index 2fbf7578..8d0ce336 100644
--- a/modules/net-address/psc.tf
+++ b/modules/net-address/psc.tf
@@ -99,4 +99,5 @@ resource "google_compute_forwarding_rule" "psc_consumer" {
   load_balancing_scheme = ""
   recreate_closed_psc   = true
   target                = each.value.service_attachment.psc_service_attachment_link
+  allow_psc_global_access   = each.value.allow_psc_global_access
 }
diff --git a/modules/net-address/variables.tf b/modules/net-address/variables.tf
index 236c2396..bee8e9e2 100644
--- a/modules/net-address/variables.tf
+++ b/modules/net-address/variables.tf
@@ -123,6 +123,7 @@ variable "psc_addresses" {
     service_attachment = optional(object({ # so we can safely check if service_attachemnt != null in for_each
       psc_service_attachment_link = string
     }))
+    allow_psc_global_access = optional(bool, false)
   }))
   default = {}
   validation {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant