Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Commit

Permalink
Add Proxy Bind to Target Proxies (#4597) (#505)
Browse files Browse the repository at this point in the history
* mark field as updatable

Co-authored-by: upodroid <[email protected]>

* add proxy_bind

Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Mar 16, 2021
1 parent a6829b3 commit 59c1300
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/resources/google_compute_target_http_proxies.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions docs/resources/google_compute_target_http_proxy.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions docs/resources/google_compute_target_https_proxies.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions docs/resources/google_compute_target_https_proxy.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions docs/resources/google_compute_target_tcp_proxies.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions docs/resources/google_compute_target_tcp_proxy.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 2 additions & 0 deletions libraries/google_compute_target_http_proxies.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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

Expand Down
2 changes: 2 additions & 0 deletions libraries/google_compute_target_http_proxy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 }))
Expand All @@ -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
Expand Down
2 changes: 2 additions & 0 deletions libraries/google_compute_target_https_proxies.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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

Expand Down
2 changes: 2 additions & 0 deletions libraries/google_compute_target_https_proxy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 }))
Expand All @@ -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
Expand Down
2 changes: 2 additions & 0 deletions libraries/google_compute_target_tcp_proxies.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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

Expand Down
2 changes: 2 additions & 0 deletions libraries/google_compute_target_tcp_proxy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 }))
Expand All @@ -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
Expand Down

0 comments on commit 59c1300

Please sign in to comment.