Skip to content

Commit fbe6cd5

Browse files
ericlin0101amanMahendroo
authored andcommitted
Support prodcuer port in network endpoint group (GoogleCloudPlatform#11820)
1 parent d545048 commit fbe6cd5

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

mmv1/products/compute/RegionNetworkEndpointGroup.yaml

+14
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,20 @@ properties:
170170
custom_expand: 'templates/terraform/custom_expand/resourceref_with_validation.go.tmpl'
171171
resource: 'Subnetwork'
172172
imports: 'selfLink'
173+
- name: 'pscData'
174+
type: NestedObject
175+
description: |
176+
This field is only used for PSC NEGs.
177+
178+
properties:
179+
- name: 'producerPort'
180+
type: String
181+
ignore_read: true
182+
description: |
183+
The PSC producer port to use when consumer PSC NEG connects to a producer. If
184+
this flag isn't specified for a PSC NEG with endpoint type
185+
private-service-connect, then PSC NEG will be connected to a first port in the
186+
available PSC producer port range.
173187
- name: 'cloudRun'
174188
type: NestedObject
175189
description: |

mmv1/templates/terraform/examples/region_network_endpoint_group_psc_service_attachment.tf.tmpl

+4-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ resource "google_compute_forwarding_rule" "default" {
3939

4040
load_balancing_scheme = "INTERNAL"
4141
backend_service = google_compute_region_backend_service.default.id
42-
all_ports = true
42+
ports = ["80", "88", "443"]
4343
network = google_compute_network.default.name
4444
subnetwork = google_compute_subnetwork.default.name
4545
}
@@ -61,7 +61,9 @@ resource "google_compute_region_network_endpoint_group" "{{$.PrimaryResourceId}}
6161

6262
network_endpoint_type = "PRIVATE_SERVICE_CONNECT"
6363
psc_target_service = google_compute_service_attachment.default.self_link
64-
64+
psc_data {
65+
producer_port = "88"
66+
}
6567
network = google_compute_network.default.self_link
6668
subnetwork = google_compute_subnetwork.default.self_link
6769
}

0 commit comments

Comments
 (0)