Skip to content

Commit

Permalink
Added network and subnetwork fields to google_compute_region_network_…
Browse files Browse the repository at this point in the history
…endpoint_group for PSC.
  • Loading branch information
rosmo committed Jul 15, 2022
1 parent 612159f commit de8198d
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
15 changes: 15 additions & 0 deletions mmv1/products/compute/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8553,6 +8553,21 @@ objects:
description: |
The target service url used to set up private service connection to
a Google API or a PSC Producer Service Attachment.
- !ruby/object:Api::Type::ResourceRef
name: 'network'
resource: 'Network'
imports: 'selfLink'
description: |
This field is only used for PSC.
The URL of the network to which all network endpoints in the NEG belong. Uses
"default" project network if unspecified.
- !ruby/object:Api::Type::ResourceRef
name: 'subnetwork'
resource: 'Subnetwork'
imports: 'selfLink'
description: |
This field is only used for PSC.
Optional URL of the subnetwork to which all network endpoints in the NEG belong.
- !ruby/object:Api::Type::NestedObject
name: 'cloudRun'
conflicts:
Expand Down
6 changes: 6 additions & 0 deletions mmv1/products/compute/terraform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1646,6 +1646,12 @@ overrides: !ruby/object:Overrides::ResourceOverrides
primary_resource_id: "psc_neg"
vars:
neg_name: "psc-neg"
- !ruby/object:Provider::Terraform::Examples
name: "region_network_endpoint_group_psc_service_attachment"
skip_test: true
primary_resource_id: "psc_neg_service_attachment"
vars:
neg_name: "psc-neg"
properties:
name: !ruby/object:Overrides::Terraform::PropertyOverride
validation: !ruby/object:Provider::Terraform::Validation
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
resource "google_compute_region_network_endpoint_group" "<%= ctx[:primary_resource_id] %>" {
name = "<%= ctx[:vars]['neg_name'] %>"
region = "asia-northeast3"

network_endpoint_type = "PRIVATE_SERVICE_CONNECT"
psc_target_service = google_compute_service_attachment.service_attachment.self_link

network = google_compute_network.network.self_link
subnetwork = google_compute_subnetwork.subnetwork.self_link
}

0 comments on commit de8198d

Please sign in to comment.