Skip to content

Commit

Permalink
Update docs for missing proxy subnet type (#8502) (#5981)
Browse files Browse the repository at this point in the history
* Update subnetwork_log_config.go.erb with new purpose

* Update Subnetwork.yaml

* Update TargetHttpsProxy.yaml

Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
modular-magician authored Jul 31, 2023
1 parent 3c984ed commit 9d780e4
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 14 deletions.
3 changes: 3 additions & 0 deletions .changelog/8502.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
compute: added a new type `GLOBAL_MANAGED_PROXY` for the filed `purpose` in the resource `google_compute_subnetwork`
```
11 changes: 6 additions & 5 deletions google-beta/services/compute/resource_compute_subnetwork.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ cannot enable direct path. Possible values: ["EXTERNAL", "INTERNAL"]`,
Optional: true,
Description: `Denotes the logging options for the subnetwork flow logs. If logging is enabled
logs will be exported to Stackdriver. This field cannot be set if the 'purpose' of this
subnetwork is 'INTERNAL_HTTPS_LOAD_BALANCER'`,
subnetwork is 'INTERNAL_HTTPS_LOAD_BALANCER' or 'REGIONAL_MANAGED_PROXY' or 'GLOBAL_MANAGED_PROXY'`,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
Expand Down Expand Up @@ -204,12 +204,13 @@ access Google APIs and services by using Private Google Access.`,
Computed: true,
Optional: true,
ForceNew: true,
Description: `The purpose of the resource. This field can be either 'PRIVATE_RFC_1918', 'INTERNAL_HTTPS_LOAD_BALANCER', 'REGIONAL_MANAGED_PROXY', or 'PRIVATE_SERVICE_CONNECT'.
Description: `The purpose of the resource. This field can be either 'PRIVATE_RFC_1918', 'INTERNAL_HTTPS_LOAD_BALANCER', 'REGIONAL_MANAGED_PROXY', 'GLOBAL_MANAGED_PROXY' or 'PRIVATE_SERVICE_CONNECT'.
A subnetwork with purpose set to 'INTERNAL_HTTPS_LOAD_BALANCER' is a user-created subnetwork that is reserved for Internal HTTP(S) Load Balancing.
A subnetwork in a given region with purpose set to 'REGIONAL_MANAGED_PROXY' is a proxy-only subnet and is shared between all the regional Envoy-based load balancers.
A subnetwork in a given region with purpose set to 'GLOBAL_MANAGED_PROXY' is a proxy-only subnet and is shared between all the cross-regional Envoy-based load balancers.
A subnetwork with purpose set to 'PRIVATE_SERVICE_CONNECT' reserves the subnet for hosting a Private Service Connect published service.
If unspecified, the purpose defaults to 'PRIVATE_RFC_1918'.
The enableFlowLogs field isn't supported with the purpose field set to 'INTERNAL_HTTPS_LOAD_BALANCER'.`,
The enableFlowLogs field isn't supported with the purpose field set to 'INTERNAL_HTTPS_LOAD_BALANCER' or 'REGIONAL_MANAGED_PROXY' or 'GLOBAL_MANAGED_PROXY'.`,
},
"region": {
Type: schema.TypeString,
Expand Down Expand Up @@ -1265,8 +1266,8 @@ func expandComputeSubnetworkLogConfig(v interface{}, d tpgresource.TerraformReso
if len(l) == 0 || l[0] == nil {
purpose, ok := d.GetOkExists("purpose")

if ok && (purpose.(string) == "REGIONAL_MANAGED_PROXY" || purpose.(string) == "INTERNAL_HTTPS_LOAD_BALANCER") {
// Subnetworks for regional L7 ILB/XLB do not accept any values for logConfig
if ok && (purpose.(string) == "REGIONAL_MANAGED_PROXY" || purpose.(string) == "GLOBAL_MANAGED_PROXY" || purpose.(string) == "INTERNAL_HTTPS_LOAD_BALANCER") {
// Subnetworks for regional L7 ILB/XLB or cross-regional L7 ILB do not accept any values for logConfig
return nil, nil
}
// send enable = false to ensure logging is disabled if there is no config
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,8 @@ specified, Google manages whether QUIC is used. Default value: "NONE" Possible v
"ssl_certificates": {
Type: schema.TypeList,
Optional: true,
Description: `A list of SslCertificate resources that are used to authenticate
connections between users and the load balancer. At least one SSL
certificate must be specified.`,
Description: `A list of SslCertificate resource URLs or Certificate Manager certificate URLs that are used to authenticate
connections between users and the load balancer. At least one resource must be specified.`,
Elem: &schema.Schema{
Type: schema.TypeString,
DiffSuppressFunc: tpgresource.CompareSelfLinkOrResourceName,
Expand Down
7 changes: 4 additions & 3 deletions website/docs/r/compute_subnetwork.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -223,12 +223,13 @@ The following arguments are supported:

* `purpose` -
(Optional)
The purpose of the resource. This field can be either `PRIVATE_RFC_1918`, `INTERNAL_HTTPS_LOAD_BALANCER`, `REGIONAL_MANAGED_PROXY`, or `PRIVATE_SERVICE_CONNECT`.
The purpose of the resource. This field can be either `PRIVATE_RFC_1918`, `INTERNAL_HTTPS_LOAD_BALANCER`, `REGIONAL_MANAGED_PROXY`, `GLOBAL_MANAGED_PROXY` or `PRIVATE_SERVICE_CONNECT`.
A subnetwork with purpose set to `INTERNAL_HTTPS_LOAD_BALANCER` is a user-created subnetwork that is reserved for Internal HTTP(S) Load Balancing.
A subnetwork in a given region with purpose set to `REGIONAL_MANAGED_PROXY` is a proxy-only subnet and is shared between all the regional Envoy-based load balancers.
A subnetwork in a given region with purpose set to `GLOBAL_MANAGED_PROXY` is a proxy-only subnet and is shared between all the cross-regional Envoy-based load balancers.
A subnetwork with purpose set to `PRIVATE_SERVICE_CONNECT` reserves the subnet for hosting a Private Service Connect published service.
If unspecified, the purpose defaults to `PRIVATE_RFC_1918`.
The enableFlowLogs field isn't supported with the purpose field set to `INTERNAL_HTTPS_LOAD_BALANCER`.
The enableFlowLogs field isn't supported with the purpose field set to `INTERNAL_HTTPS_LOAD_BALANCER` or `REGIONAL_MANAGED_PROXY` or `GLOBAL_MANAGED_PROXY`.

* `role` -
(Optional)
Expand Down Expand Up @@ -269,7 +270,7 @@ The following arguments are supported:
(Optional)
Denotes the logging options for the subnetwork flow logs. If logging is enabled
logs will be exported to Stackdriver. This field cannot be set if the `purpose` of this
subnetwork is `INTERNAL_HTTPS_LOAD_BALANCER`
subnetwork is `INTERNAL_HTTPS_LOAD_BALANCER` or `REGIONAL_MANAGED_PROXY` or `GLOBAL_MANAGED_PROXY`
Structure is [documented below](#nested_log_config).

* `stack_type` -
Expand Down
5 changes: 2 additions & 3 deletions website/docs/r/compute_target_https_proxy.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,8 @@ The following arguments are supported:

* `ssl_certificates` -
(Optional)
A list of SslCertificate resources that are used to authenticate
connections between users and the load balancer. At least one SSL
certificate must be specified.
A list of SslCertificate resource URLs or Certificate Manager certificate URLs that are used to authenticate
connections between users and the load balancer. At least one resource must be specified.

* `certificate_map` -
(Optional)
Expand Down

0 comments on commit 9d780e4

Please sign in to comment.