diff --git a/modules/job-exec/main.tf b/modules/job-exec/main.tf index 8f9f05b6..b3c3c1b0 100644 --- a/modules/job-exec/main.tf +++ b/modules/job-exec/main.tf @@ -102,6 +102,14 @@ resource "google_cloud_run_v2_job" "job" { content { connector = vpc_access.value["connector"] egress = vpc_access.value["egress"] + dynamic "network_interfaces" { + for_each = vpc_access.value["network_interfaces"] + content { + network = network_interfaces.value["network"] + subnetwork = network_interfaces.value["subnetwork"] + tags = network_interfaces.value["tags"] + } + } } } } diff --git a/modules/job-exec/variables.tf b/modules/job-exec/variables.tf index 18c1d14d..73ae81c5 100644 --- a/modules/job-exec/variables.tf +++ b/modules/job-exec/variables.tf @@ -140,6 +140,11 @@ variable "vpc_access" { type = list(object({ connector = string egress = string + network_interfaces = optional(object({ + network = optional(string) + subnetwork = optional(string) + tags = optional(list(string)) + })) })) description = "VPC Access configuration to use for this Task." default = []