Skip to content

Commit

Permalink
Add serviceDirectoryRegistrations message to resource google_compute_…
Browse files Browse the repository at this point in the history
…global_forwarding_rule (GoogleCloudPlatform#9485)

* Add serviceDirectoryRegistrations in google_compute_global_forwarding_rule

* Add service_directory_registration message in example private_service_connect_google_apis.tf.erb

* Remove service field from service_directory_registration message as it is not currently applicable for globalForwardingRule
  • Loading branch information
arnabadg-google authored and BBBmau committed Nov 28, 2023
1 parent 0e1a0dc commit 6552281
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
26 changes: 26 additions & 0 deletions mmv1/products/compute/GlobalForwardingRule.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,32 @@ properties:
update_verb: :POST
update_url: 'projects/{{project}}/global/forwardingRules/{{name}}/setTarget'
diff_suppress_func: 'tpgresource.CompareSelfLinkRelativePaths'
- !ruby/object:Api::Type::Array
name: 'serviceDirectoryRegistrations'
description: |
Service Directory resources to register this forwarding rule with.
Currently, only supports a single Service Directory resource.
min_size: 0
max_size: 1
immutable: true
default_from_api: true
item_type: !ruby/object:Api::Type::NestedObject
properties:
- !ruby/object:Api::Type::String
name: 'namespace'
description: |
Service Directory namespace to register the forwarding rule under.
immutable: true
default_from_api: true
- !ruby/object:Api::Type::String
name: 'serviceDirectoryRegion'
description: |
[Optional] Service Directory region to register this global forwarding rule under.
Default to "us-central1". Only used for PSC for Google APIs. All PSC for
Google APIs Forwarding Rules on the same network should use the same Service
Directory region.
immutable: true
- !ruby/object:Api::Type::Array
name: sourceIpRanges
description: If not empty, this Forwarding Rule will only forward the traffic when the source IP address matches one of the IP addresses or CIDR ranges set here. Note that a Forwarding Rule can only have up to 64 source IP ranges, and this field can only be used with a regional Forwarding Rule whose scheme is EXTERNAL. Each sourceIpRange entry should be either an IP address (for example, 1.2.3.4) or a CIDR range (for example, 1.2.3.0/24).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,9 @@ resource "google_compute_global_forwarding_rule" "default" {
network = google_compute_network.network.id
ip_address = google_compute_global_address.default.id
load_balancing_scheme = ""
service_directory_registrations {
namespace = "sd-namespace"
service_directory_region = "europe-west3"
}
}
# [END compute_forwarding_rule_private_access]

0 comments on commit 6552281

Please sign in to comment.