From 59c13008bbfac341b8a40fe58fe871971c9e6e09 Mon Sep 17 00:00:00 2001 From: The Magician Date: Tue, 16 Mar 2021 16:05:20 -0700 Subject: [PATCH] Add Proxy Bind to Target Proxies (#4597) (#505) * mark field as updatable Co-authored-by: upodroid * add proxy_bind Signed-off-by: Modular Magician --- docs/resources/google_compute_target_http_proxies.md | 1 + docs/resources/google_compute_target_http_proxy.md | 2 ++ docs/resources/google_compute_target_https_proxies.md | 1 + docs/resources/google_compute_target_https_proxy.md | 2 ++ docs/resources/google_compute_target_tcp_proxies.md | 1 + docs/resources/google_compute_target_tcp_proxy.md | 2 ++ libraries/google_compute_target_http_proxies.rb | 2 ++ libraries/google_compute_target_http_proxy.rb | 2 ++ libraries/google_compute_target_https_proxies.rb | 2 ++ libraries/google_compute_target_https_proxy.rb | 2 ++ libraries/google_compute_target_tcp_proxies.rb | 2 ++ libraries/google_compute_target_tcp_proxy.rb | 2 ++ 12 files changed, 21 insertions(+) diff --git a/docs/resources/google_compute_target_http_proxies.md b/docs/resources/google_compute_target_http_proxies.md index e81a275bc..9ddee5573 100644 --- a/docs/resources/google_compute_target_http_proxies.md +++ b/docs/resources/google_compute_target_http_proxies.md @@ -27,6 +27,7 @@ See [google_compute_target_http_proxy.md](google_compute_target_http_proxy.md) f * `ids`: an array of `google_compute_target_http_proxy` id * `names`: an array of `google_compute_target_http_proxy` name * `url_maps`: an array of `google_compute_target_http_proxy` url_map + * `proxy_binds`: an array of `google_compute_target_http_proxy` proxy_bind ## Filter Criteria This resource supports all of the above properties as filter criteria, which can be used diff --git a/docs/resources/google_compute_target_http_proxy.md b/docs/resources/google_compute_target_http_proxy.md index 8d0d485f4..25d2f0706 100644 --- a/docs/resources/google_compute_target_http_proxy.md +++ b/docs/resources/google_compute_target_http_proxy.md @@ -37,6 +37,8 @@ Properties that can be accessed from the `google_compute_target_http_proxy` reso * `url_map`: A reference to the UrlMap resource that defines the mapping from URL to the BackendService. + * `proxy_bind`: This field only applies when the forwarding rule that references this target proxy has a loadBalancingScheme set to INTERNAL_SELF_MANAGED. + ## GCP Permissions diff --git a/docs/resources/google_compute_target_https_proxies.md b/docs/resources/google_compute_target_https_proxies.md index a95f18f12..5fb0e79a1 100644 --- a/docs/resources/google_compute_target_https_proxies.md +++ b/docs/resources/google_compute_target_https_proxies.md @@ -30,6 +30,7 @@ See [google_compute_target_https_proxy.md](google_compute_target_https_proxy.md) * `ssl_certificates`: an array of `google_compute_target_https_proxy` ssl_certificates * `ssl_policies`: an array of `google_compute_target_https_proxy` ssl_policy * `url_maps`: an array of `google_compute_target_https_proxy` url_map + * `proxy_binds`: an array of `google_compute_target_https_proxy` proxy_bind ## Filter Criteria This resource supports all of the above properties as filter criteria, which can be used diff --git a/docs/resources/google_compute_target_https_proxy.md b/docs/resources/google_compute_target_https_proxy.md index ffd1e07f4..e112ed74a 100644 --- a/docs/resources/google_compute_target_https_proxy.md +++ b/docs/resources/google_compute_target_https_proxy.md @@ -47,6 +47,8 @@ Properties that can be accessed from the `google_compute_target_https_proxy` res * `url_map`: A reference to the UrlMap resource that defines the mapping from URL to the BackendService. + * `proxy_bind`: This field only applies when the forwarding rule that references this target proxy has a loadBalancingScheme set to INTERNAL_SELF_MANAGED. + ## GCP Permissions diff --git a/docs/resources/google_compute_target_tcp_proxies.md b/docs/resources/google_compute_target_tcp_proxies.md index 73e9a051c..609587260 100644 --- a/docs/resources/google_compute_target_tcp_proxies.md +++ b/docs/resources/google_compute_target_tcp_proxies.md @@ -28,6 +28,7 @@ See [google_compute_target_tcp_proxy.md](google_compute_target_tcp_proxy.md) for * `names`: an array of `google_compute_target_tcp_proxy` name * `proxy_headers`: an array of `google_compute_target_tcp_proxy` proxy_header * `services`: an array of `google_compute_target_tcp_proxy` service + * `proxy_binds`: an array of `google_compute_target_tcp_proxy` proxy_bind ## Filter Criteria This resource supports all of the above properties as filter criteria, which can be used diff --git a/docs/resources/google_compute_target_tcp_proxy.md b/docs/resources/google_compute_target_tcp_proxy.md index 5f5cc3fd8..515017020 100644 --- a/docs/resources/google_compute_target_tcp_proxy.md +++ b/docs/resources/google_compute_target_tcp_proxy.md @@ -42,6 +42,8 @@ Properties that can be accessed from the `google_compute_target_tcp_proxy` resou * `service`: A reference to the BackendService resource. + * `proxy_bind`: This field only applies when the forwarding rule that references this target proxy has a loadBalancingScheme set to INTERNAL_SELF_MANAGED. + ## GCP Permissions diff --git a/libraries/google_compute_target_http_proxies.rb b/libraries/google_compute_target_http_proxies.rb index f7230aaba..42afcc50d 100644 --- a/libraries/google_compute_target_http_proxies.rb +++ b/libraries/google_compute_target_http_proxies.rb @@ -28,6 +28,7 @@ class ComputeTargetHttpProxys < GcpResourceBase filter_table_config.add(:ids, field: :id) filter_table_config.add(:names, field: :name) filter_table_config.add(:url_maps, field: :url_map) + filter_table_config.add(:proxy_binds, field: :proxy_bind) filter_table_config.connect(self, :table) @@ -72,6 +73,7 @@ def transformers 'id' => ->(obj) { return :id, obj['id'] }, 'name' => ->(obj) { return :name, obj['name'] }, 'urlMap' => ->(obj) { return :url_map, obj['urlMap'] }, + 'proxyBind' => ->(obj) { return :proxy_bind, obj['proxyBind'] }, } end diff --git a/libraries/google_compute_target_http_proxy.rb b/libraries/google_compute_target_http_proxy.rb index 97f7db906..e8946b15a 100644 --- a/libraries/google_compute_target_http_proxy.rb +++ b/libraries/google_compute_target_http_proxy.rb @@ -27,6 +27,7 @@ class ComputeTargetHttpProxy < GcpResourceBase attr_reader :id attr_reader :name attr_reader :url_map + attr_reader :proxy_bind def initialize(params) super(params.merge({ use_http_transport: true })) @@ -41,6 +42,7 @@ def parse @id = @fetched['id'] @name = @fetched['name'] @url_map = @fetched['urlMap'] + @proxy_bind = @fetched['proxyBind'] end # Handles parsing RFC3339 time string diff --git a/libraries/google_compute_target_https_proxies.rb b/libraries/google_compute_target_https_proxies.rb index ce020873a..23c489e70 100644 --- a/libraries/google_compute_target_https_proxies.rb +++ b/libraries/google_compute_target_https_proxies.rb @@ -31,6 +31,7 @@ class ComputeTargetHttpsProxys < GcpResourceBase filter_table_config.add(:ssl_certificates, field: :ssl_certificates) filter_table_config.add(:ssl_policies, field: :ssl_policy) filter_table_config.add(:url_maps, field: :url_map) + filter_table_config.add(:proxy_binds, field: :proxy_bind) filter_table_config.connect(self, :table) @@ -78,6 +79,7 @@ def transformers 'sslCertificates' => ->(obj) { return :ssl_certificates, obj['sslCertificates'] }, 'sslPolicy' => ->(obj) { return :ssl_policy, obj['sslPolicy'] }, 'urlMap' => ->(obj) { return :url_map, obj['urlMap'] }, + 'proxyBind' => ->(obj) { return :proxy_bind, obj['proxyBind'] }, } end diff --git a/libraries/google_compute_target_https_proxy.rb b/libraries/google_compute_target_https_proxy.rb index 043d77a16..591cdcc0e 100644 --- a/libraries/google_compute_target_https_proxy.rb +++ b/libraries/google_compute_target_https_proxy.rb @@ -30,6 +30,7 @@ class ComputeTargetHttpsProxy < GcpResourceBase attr_reader :ssl_certificates attr_reader :ssl_policy attr_reader :url_map + attr_reader :proxy_bind def initialize(params) super(params.merge({ use_http_transport: true })) @@ -47,6 +48,7 @@ def parse @ssl_certificates = @fetched['sslCertificates'] @ssl_policy = @fetched['sslPolicy'] @url_map = @fetched['urlMap'] + @proxy_bind = @fetched['proxyBind'] end # Handles parsing RFC3339 time string diff --git a/libraries/google_compute_target_tcp_proxies.rb b/libraries/google_compute_target_tcp_proxies.rb index 2fc8a8754..46a97e7cf 100644 --- a/libraries/google_compute_target_tcp_proxies.rb +++ b/libraries/google_compute_target_tcp_proxies.rb @@ -29,6 +29,7 @@ class ComputeTargetTcpProxys < GcpResourceBase filter_table_config.add(:names, field: :name) filter_table_config.add(:proxy_headers, field: :proxy_header) filter_table_config.add(:services, field: :service) + filter_table_config.add(:proxy_binds, field: :proxy_bind) filter_table_config.connect(self, :table) @@ -74,6 +75,7 @@ def transformers 'name' => ->(obj) { return :name, obj['name'] }, 'proxyHeader' => ->(obj) { return :proxy_header, obj['proxyHeader'] }, 'service' => ->(obj) { return :service, obj['service'] }, + 'proxyBind' => ->(obj) { return :proxy_bind, obj['proxyBind'] }, } end diff --git a/libraries/google_compute_target_tcp_proxy.rb b/libraries/google_compute_target_tcp_proxy.rb index 6ffce7326..21bc55af4 100644 --- a/libraries/google_compute_target_tcp_proxy.rb +++ b/libraries/google_compute_target_tcp_proxy.rb @@ -28,6 +28,7 @@ class ComputeTargetTcpProxy < GcpResourceBase attr_reader :name attr_reader :proxy_header attr_reader :service + attr_reader :proxy_bind def initialize(params) super(params.merge({ use_http_transport: true })) @@ -43,6 +44,7 @@ def parse @name = @fetched['name'] @proxy_header = @fetched['proxyHeader'] @service = @fetched['service'] + @proxy_bind = @fetched['proxyBind'] end # Handles parsing RFC3339 time string