/
regionBackendService.go
565 lines (497 loc) · 73.6 KB
/
regionBackendService.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
// Code generated by the Pulumi SDK Generator DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package beta
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-google-native/sdk/go/google/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Creates a regional BackendService resource in the specified project using the data included in the request. For more information, see Backend services overview.
type RegionBackendService struct {
pulumi.CustomResourceState
// Lifetime of cookies in seconds. This setting is applicable to external and internal HTTP(S) load balancers and Traffic Director and requires GENERATED_COOKIE or HTTP_COOKIE session affinity. If set to 0, the cookie is non-persistent and lasts only until the end of the browser session (or equivalent). The maximum allowed value is two weeks (1,209,600). Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
AffinityCookieTtlSec pulumi.IntOutput `pulumi:"affinityCookieTtlSec"`
// The list of backends that serve this BackendService.
Backends BackendResponseArrayOutput `pulumi:"backends"`
// Cloud CDN configuration for this BackendService. Only available for specified load balancer types.
CdnPolicy BackendServiceCdnPolicyResponseOutput `pulumi:"cdnPolicy"`
CircuitBreakers CircuitBreakersResponseOutput `pulumi:"circuitBreakers"`
// Compress text responses using Brotli or gzip compression, based on the client's Accept-Encoding header.
CompressionMode pulumi.StringOutput `pulumi:"compressionMode"`
ConnectionDraining ConnectionDrainingResponseOutput `pulumi:"connectionDraining"`
// Connection Tracking configuration for this BackendService. Connection tracking policy settings are only available for Network Load Balancing and Internal TCP/UDP Load Balancing.
ConnectionTrackingPolicy BackendServiceConnectionTrackingPolicyResponseOutput `pulumi:"connectionTrackingPolicy"`
// Consistent Hash-based load balancing can be used to provide soft session affinity based on HTTP headers, cookies or other properties. This load balancing policy is applicable only for HTTP connections. The affinity to a particular destination host will be lost when one or more hosts are added/removed from the destination service. This field specifies parameters that control consistent hashing. This field is only applicable when localityLbPolicy is set to MAGLEV or RING_HASH. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
ConsistentHash ConsistentHashLoadBalancerSettingsResponseOutput `pulumi:"consistentHash"`
// Creation timestamp in RFC3339 text format.
CreationTimestamp pulumi.StringOutput `pulumi:"creationTimestamp"`
// Headers that the load balancer adds to proxied requests. See [Creating custom headers](https://cloud.google.com/load-balancing/docs/custom-headers).
CustomRequestHeaders pulumi.StringArrayOutput `pulumi:"customRequestHeaders"`
// Headers that the load balancer adds to proxied responses. See [Creating custom headers](https://cloud.google.com/load-balancing/docs/custom-headers).
CustomResponseHeaders pulumi.StringArrayOutput `pulumi:"customResponseHeaders"`
// An optional description of this resource. Provide this property when you create the resource.
Description pulumi.StringOutput `pulumi:"description"`
// The resource URL for the edge security policy associated with this backend service.
EdgeSecurityPolicy pulumi.StringOutput `pulumi:"edgeSecurityPolicy"`
// If true, enables Cloud CDN for the backend service of an external HTTP(S) load balancer.
EnableCDN pulumi.BoolOutput `pulumi:"enableCDN"`
// Requires at least one backend instance group to be defined as a backup (failover) backend. For load balancers that have configurable failover: [Internal TCP/UDP Load Balancing](https://cloud.google.com/load-balancing/docs/internal/failover-overview) and [external TCP/UDP Load Balancing](https://cloud.google.com/load-balancing/docs/network/networklb-failover-overview).
FailoverPolicy BackendServiceFailoverPolicyResponseOutput `pulumi:"failoverPolicy"`
// Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a BackendService. An up-to-date fingerprint must be provided in order to update the BackendService, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a BackendService.
Fingerprint pulumi.StringOutput `pulumi:"fingerprint"`
// The list of URLs to the healthChecks, httpHealthChecks (legacy), or httpsHealthChecks (legacy) resource for health checking this backend service. Not all backend services support legacy health checks. See Load balancer guide. Currently, at most one health check can be specified for each backend service. Backend services with instance group or zonal NEG backends must have a health check. Backend services with internet or serverless NEG backends must not have a health check.
HealthChecks pulumi.StringArrayOutput `pulumi:"healthChecks"`
// The configurations for Identity-Aware Proxy on this resource. Not available for Internal TCP/UDP Load Balancing and Network Load Balancing.
Iap BackendServiceIAPResponseOutput `pulumi:"iap"`
// Specifies a preference for traffic sent from the proxy to the backend (or from the client to the backend for proxyless gRPC). The possible values are: - IPV4_ONLY: Only send IPv4 traffic to the backends of the backend service (Instance Group, Managed Instance Group, Network Endpoint Group), regardless of traffic from the client to the proxy. Only IPv4 health checks are used to check the health of the backends. This is the default setting. - PREFER_IPV6: Prioritize the connection to the endpoint's IPv6 address over its IPv4 address (provided there is a healthy IPv6 address). - IPV6_ONLY: Only send IPv6 traffic to the backends of the backend service (Instance Group, Managed Instance Group, Network Endpoint Group), regardless of traffic from the client to the proxy. Only IPv6 health checks are used to check the health of the backends. This field is applicable to either: - Advanced Global External HTTPS Load Balancing (load balancing scheme EXTERNAL_MANAGED), - Regional External HTTPS Load Balancing, - Internal TCP Proxy (load balancing scheme INTERNAL_MANAGED), - Regional Internal HTTPS Load Balancing (load balancing scheme INTERNAL_MANAGED), - Traffic Director with Envoy proxies and proxyless gRPC (load balancing scheme INTERNAL_SELF_MANAGED).
IpAddressSelectionPolicy pulumi.StringOutput `pulumi:"ipAddressSelectionPolicy"`
// Type of resource. Always compute#backendService for backend services.
Kind pulumi.StringOutput `pulumi:"kind"`
// Specifies the load balancer type. A backend service created for one type of load balancer cannot be used with another. For more information, refer to Choosing a load balancer.
LoadBalancingScheme pulumi.StringOutput `pulumi:"loadBalancingScheme"`
// A list of locality load-balancing policies to be used in order of preference. When you use localityLbPolicies, you must set at least one value for either the localityLbPolicies[].policy or the localityLbPolicies[].customPolicy field. localityLbPolicies overrides any value set in the localityLbPolicy field. For an example of how to use this field, see Define a list of preferred policies. Caution: This field and its children are intended for use in a service mesh that includes gRPC clients only. Envoy proxies can't use backend services that have this configuration.
LocalityLbPolicies BackendServiceLocalityLoadBalancingPolicyConfigResponseArrayOutput `pulumi:"localityLbPolicies"`
// The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not NONE, and this field is not set to MAGLEV or RING_HASH, session affinity settings will not take effect. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
LocalityLbPolicy pulumi.StringOutput `pulumi:"localityLbPolicy"`
// This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver.
LogConfig BackendServiceLogConfigResponseOutput `pulumi:"logConfig"`
// Specifies the default maximum duration (timeout) for streams to this service. Duration is computed from the beginning of the stream until the response has been completely processed, including all retries. A stream that does not complete in this duration is closed. If not specified, there will be no timeout limit, i.e. the maximum duration is infinite. This value can be overridden in the PathMatcher configuration of the UrlMap that references this backend service. This field is only allowed when the loadBalancingScheme of the backend service is INTERNAL_SELF_MANAGED.
MaxStreamDuration DurationResponseOutput `pulumi:"maxStreamDuration"`
// Deployment metadata associated with the resource to be set by a GKE hub controller and read by the backend RCTH
Metadatas pulumi.StringMapOutput `pulumi:"metadatas"`
// Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Name pulumi.StringOutput `pulumi:"name"`
// The URL of the network to which this backend service belongs. This field can only be specified when the load balancing scheme is set to INTERNAL.
Network pulumi.StringOutput `pulumi:"network"`
// Settings controlling the ejection of unhealthy backend endpoints from the load balancing pool of each individual proxy instance that processes the traffic for the given backend service. If not set, this feature is considered disabled. Results of the outlier detection algorithm (ejection of endpoints from the load balancing pool and returning them back to the pool) are executed independently by each proxy instance of the load balancer. In most cases, more than one proxy instance handles the traffic received by a backend service. Thus, it is possible that an unhealthy endpoint is detected and ejected by only some of the proxies, and while this happens, other proxies may continue to send requests to the same unhealthy endpoint until they detect and eject the unhealthy endpoint. Applicable backend endpoints can be: - VM instances in an Instance Group - Endpoints in a Zonal NEG (GCE_VM_IP, GCE_VM_IP_PORT) - Endpoints in a Hybrid Connectivity NEG (NON_GCP_PRIVATE_IP_PORT) - Serverless NEGs, that resolve to Cloud Run, App Engine, or Cloud Functions Services - Private Service Connect NEGs, that resolve to Google-managed regional API endpoints or managed services published using Private Service Connect Applicable backend service types can be: - A global backend service with the loadBalancingScheme set to INTERNAL_SELF_MANAGED or EXTERNAL_MANAGED. - A regional backend service with the serviceProtocol set to HTTP, HTTPS, or HTTP2, and loadBalancingScheme set to INTERNAL_MANAGED or EXTERNAL_MANAGED. Not supported for Serverless NEGs. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
OutlierDetection OutlierDetectionResponseOutput `pulumi:"outlierDetection"`
// Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80. For Internal TCP/UDP Load Balancing and Network Load Balancing, omit port.
//
// Deprecated: Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80. For Internal TCP/UDP Load Balancing and Network Load Balancing, omit port.
Port pulumi.IntOutput `pulumi:"port"`
// A named port on a backend instance group representing the port for communication to the backend VMs in that group. The named port must be [defined on each backend instance group](https://cloud.google.com/load-balancing/docs/backend-service#named_ports). This parameter has no meaning if the backends are NEGs. For Internal TCP/UDP Load Balancing and Network Load Balancing, omit port_name.
PortName pulumi.StringOutput `pulumi:"portName"`
Project pulumi.StringOutput `pulumi:"project"`
// The protocol this BackendService uses to communicate with backends. Possible values are HTTP, HTTPS, HTTP2, TCP, SSL, UDP or GRPC. depending on the chosen load balancer or Traffic Director configuration. Refer to the documentation for the load balancers or for Traffic Director for more information. Must be set to GRPC when the backend service is referenced by a URL map that is bound to target gRPC proxy.
Protocol pulumi.StringOutput `pulumi:"protocol"`
Region pulumi.StringOutput `pulumi:"region"`
// An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
RequestId pulumi.StringPtrOutput `pulumi:"requestId"`
// The resource URL for the security policy associated with this backend service.
SecurityPolicy pulumi.StringOutput `pulumi:"securityPolicy"`
// This field specifies the security settings that apply to this backend service. This field is applicable to a global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
SecuritySettings SecuritySettingsResponseOutput `pulumi:"securitySettings"`
// Server-defined URL for the resource.
SelfLink pulumi.StringOutput `pulumi:"selfLink"`
// URLs of networkservices.ServiceBinding resources. Can only be set if load balancing scheme is INTERNAL_SELF_MANAGED. If set, lists of backends and health checks must be both empty.
ServiceBindings pulumi.StringArrayOutput `pulumi:"serviceBindings"`
// URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
ServiceLbPolicy pulumi.StringOutput `pulumi:"serviceLbPolicy"`
// Type of session affinity to use. The default is NONE. Only NONE and HEADER_FIELD are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. For more details, see: [Session Affinity](https://cloud.google.com/load-balancing/docs/backend-service#session_affinity).
SessionAffinity pulumi.StringOutput `pulumi:"sessionAffinity"`
Subsetting SubsettingResponseOutput `pulumi:"subsetting"`
// The backend service timeout has a different meaning depending on the type of load balancer. For more information see, Backend service settings. The default is 30 seconds. The full range of timeout values allowed goes from 1 through 2,147,483,647 seconds. This value can be overridden in the PathMatcher configuration of the UrlMap that references this backend service. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. Instead, use maxStreamDuration.
TimeoutSec pulumi.IntOutput `pulumi:"timeoutSec"`
UsedBy BackendServiceUsedByResponseArrayOutput `pulumi:"usedBy"`
}
// NewRegionBackendService registers a new resource with the given unique name, arguments, and options.
func NewRegionBackendService(ctx *pulumi.Context,
name string, args *RegionBackendServiceArgs, opts ...pulumi.ResourceOption) (*RegionBackendService, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Region == nil {
return nil, errors.New("invalid value for required argument 'Region'")
}
replaceOnChanges := pulumi.ReplaceOnChanges([]string{
"project",
"region",
})
opts = append(opts, replaceOnChanges)
opts = internal.PkgResourceDefaultOpts(opts)
var resource RegionBackendService
err := ctx.RegisterResource("google-native:compute/beta:RegionBackendService", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetRegionBackendService gets an existing RegionBackendService resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetRegionBackendService(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *RegionBackendServiceState, opts ...pulumi.ResourceOption) (*RegionBackendService, error) {
var resource RegionBackendService
err := ctx.ReadResource("google-native:compute/beta:RegionBackendService", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering RegionBackendService resources.
type regionBackendServiceState struct {
}
type RegionBackendServiceState struct {
}
func (RegionBackendServiceState) ElementType() reflect.Type {
return reflect.TypeOf((*regionBackendServiceState)(nil)).Elem()
}
type regionBackendServiceArgs struct {
// Lifetime of cookies in seconds. This setting is applicable to external and internal HTTP(S) load balancers and Traffic Director and requires GENERATED_COOKIE or HTTP_COOKIE session affinity. If set to 0, the cookie is non-persistent and lasts only until the end of the browser session (or equivalent). The maximum allowed value is two weeks (1,209,600). Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
AffinityCookieTtlSec *int `pulumi:"affinityCookieTtlSec"`
// The list of backends that serve this BackendService.
Backends []Backend `pulumi:"backends"`
// Cloud CDN configuration for this BackendService. Only available for specified load balancer types.
CdnPolicy *BackendServiceCdnPolicy `pulumi:"cdnPolicy"`
CircuitBreakers *CircuitBreakers `pulumi:"circuitBreakers"`
// Compress text responses using Brotli or gzip compression, based on the client's Accept-Encoding header.
CompressionMode *RegionBackendServiceCompressionMode `pulumi:"compressionMode"`
ConnectionDraining *ConnectionDraining `pulumi:"connectionDraining"`
// Connection Tracking configuration for this BackendService. Connection tracking policy settings are only available for Network Load Balancing and Internal TCP/UDP Load Balancing.
ConnectionTrackingPolicy *BackendServiceConnectionTrackingPolicy `pulumi:"connectionTrackingPolicy"`
// Consistent Hash-based load balancing can be used to provide soft session affinity based on HTTP headers, cookies or other properties. This load balancing policy is applicable only for HTTP connections. The affinity to a particular destination host will be lost when one or more hosts are added/removed from the destination service. This field specifies parameters that control consistent hashing. This field is only applicable when localityLbPolicy is set to MAGLEV or RING_HASH. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
ConsistentHash *ConsistentHashLoadBalancerSettings `pulumi:"consistentHash"`
// Headers that the load balancer adds to proxied requests. See [Creating custom headers](https://cloud.google.com/load-balancing/docs/custom-headers).
CustomRequestHeaders []string `pulumi:"customRequestHeaders"`
// Headers that the load balancer adds to proxied responses. See [Creating custom headers](https://cloud.google.com/load-balancing/docs/custom-headers).
CustomResponseHeaders []string `pulumi:"customResponseHeaders"`
// An optional description of this resource. Provide this property when you create the resource.
Description *string `pulumi:"description"`
// If true, enables Cloud CDN for the backend service of an external HTTP(S) load balancer.
EnableCDN *bool `pulumi:"enableCDN"`
// Requires at least one backend instance group to be defined as a backup (failover) backend. For load balancers that have configurable failover: [Internal TCP/UDP Load Balancing](https://cloud.google.com/load-balancing/docs/internal/failover-overview) and [external TCP/UDP Load Balancing](https://cloud.google.com/load-balancing/docs/network/networklb-failover-overview).
FailoverPolicy *BackendServiceFailoverPolicy `pulumi:"failoverPolicy"`
// The list of URLs to the healthChecks, httpHealthChecks (legacy), or httpsHealthChecks (legacy) resource for health checking this backend service. Not all backend services support legacy health checks. See Load balancer guide. Currently, at most one health check can be specified for each backend service. Backend services with instance group or zonal NEG backends must have a health check. Backend services with internet or serverless NEG backends must not have a health check.
HealthChecks []string `pulumi:"healthChecks"`
// The configurations for Identity-Aware Proxy on this resource. Not available for Internal TCP/UDP Load Balancing and Network Load Balancing.
Iap *BackendServiceIAP `pulumi:"iap"`
// Specifies a preference for traffic sent from the proxy to the backend (or from the client to the backend for proxyless gRPC). The possible values are: - IPV4_ONLY: Only send IPv4 traffic to the backends of the backend service (Instance Group, Managed Instance Group, Network Endpoint Group), regardless of traffic from the client to the proxy. Only IPv4 health checks are used to check the health of the backends. This is the default setting. - PREFER_IPV6: Prioritize the connection to the endpoint's IPv6 address over its IPv4 address (provided there is a healthy IPv6 address). - IPV6_ONLY: Only send IPv6 traffic to the backends of the backend service (Instance Group, Managed Instance Group, Network Endpoint Group), regardless of traffic from the client to the proxy. Only IPv6 health checks are used to check the health of the backends. This field is applicable to either: - Advanced Global External HTTPS Load Balancing (load balancing scheme EXTERNAL_MANAGED), - Regional External HTTPS Load Balancing, - Internal TCP Proxy (load balancing scheme INTERNAL_MANAGED), - Regional Internal HTTPS Load Balancing (load balancing scheme INTERNAL_MANAGED), - Traffic Director with Envoy proxies and proxyless gRPC (load balancing scheme INTERNAL_SELF_MANAGED).
IpAddressSelectionPolicy *RegionBackendServiceIpAddressSelectionPolicy `pulumi:"ipAddressSelectionPolicy"`
// Specifies the load balancer type. A backend service created for one type of load balancer cannot be used with another. For more information, refer to Choosing a load balancer.
LoadBalancingScheme *RegionBackendServiceLoadBalancingScheme `pulumi:"loadBalancingScheme"`
// A list of locality load-balancing policies to be used in order of preference. When you use localityLbPolicies, you must set at least one value for either the localityLbPolicies[].policy or the localityLbPolicies[].customPolicy field. localityLbPolicies overrides any value set in the localityLbPolicy field. For an example of how to use this field, see Define a list of preferred policies. Caution: This field and its children are intended for use in a service mesh that includes gRPC clients only. Envoy proxies can't use backend services that have this configuration.
LocalityLbPolicies []BackendServiceLocalityLoadBalancingPolicyConfig `pulumi:"localityLbPolicies"`
// The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not NONE, and this field is not set to MAGLEV or RING_HASH, session affinity settings will not take effect. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
LocalityLbPolicy *RegionBackendServiceLocalityLbPolicy `pulumi:"localityLbPolicy"`
// This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver.
LogConfig *BackendServiceLogConfig `pulumi:"logConfig"`
// Specifies the default maximum duration (timeout) for streams to this service. Duration is computed from the beginning of the stream until the response has been completely processed, including all retries. A stream that does not complete in this duration is closed. If not specified, there will be no timeout limit, i.e. the maximum duration is infinite. This value can be overridden in the PathMatcher configuration of the UrlMap that references this backend service. This field is only allowed when the loadBalancingScheme of the backend service is INTERNAL_SELF_MANAGED.
MaxStreamDuration *Duration `pulumi:"maxStreamDuration"`
// Deployment metadata associated with the resource to be set by a GKE hub controller and read by the backend RCTH
Metadatas map[string]string `pulumi:"metadatas"`
// Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Name *string `pulumi:"name"`
// The URL of the network to which this backend service belongs. This field can only be specified when the load balancing scheme is set to INTERNAL.
Network *string `pulumi:"network"`
// Settings controlling the ejection of unhealthy backend endpoints from the load balancing pool of each individual proxy instance that processes the traffic for the given backend service. If not set, this feature is considered disabled. Results of the outlier detection algorithm (ejection of endpoints from the load balancing pool and returning them back to the pool) are executed independently by each proxy instance of the load balancer. In most cases, more than one proxy instance handles the traffic received by a backend service. Thus, it is possible that an unhealthy endpoint is detected and ejected by only some of the proxies, and while this happens, other proxies may continue to send requests to the same unhealthy endpoint until they detect and eject the unhealthy endpoint. Applicable backend endpoints can be: - VM instances in an Instance Group - Endpoints in a Zonal NEG (GCE_VM_IP, GCE_VM_IP_PORT) - Endpoints in a Hybrid Connectivity NEG (NON_GCP_PRIVATE_IP_PORT) - Serverless NEGs, that resolve to Cloud Run, App Engine, or Cloud Functions Services - Private Service Connect NEGs, that resolve to Google-managed regional API endpoints or managed services published using Private Service Connect Applicable backend service types can be: - A global backend service with the loadBalancingScheme set to INTERNAL_SELF_MANAGED or EXTERNAL_MANAGED. - A regional backend service with the serviceProtocol set to HTTP, HTTPS, or HTTP2, and loadBalancingScheme set to INTERNAL_MANAGED or EXTERNAL_MANAGED. Not supported for Serverless NEGs. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
OutlierDetection *OutlierDetection `pulumi:"outlierDetection"`
// Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80. For Internal TCP/UDP Load Balancing and Network Load Balancing, omit port.
//
// Deprecated: Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80. For Internal TCP/UDP Load Balancing and Network Load Balancing, omit port.
Port *int `pulumi:"port"`
// A named port on a backend instance group representing the port for communication to the backend VMs in that group. The named port must be [defined on each backend instance group](https://cloud.google.com/load-balancing/docs/backend-service#named_ports). This parameter has no meaning if the backends are NEGs. For Internal TCP/UDP Load Balancing and Network Load Balancing, omit port_name.
PortName *string `pulumi:"portName"`
Project *string `pulumi:"project"`
// The protocol this BackendService uses to communicate with backends. Possible values are HTTP, HTTPS, HTTP2, TCP, SSL, UDP or GRPC. depending on the chosen load balancer or Traffic Director configuration. Refer to the documentation for the load balancers or for Traffic Director for more information. Must be set to GRPC when the backend service is referenced by a URL map that is bound to target gRPC proxy.
Protocol *RegionBackendServiceProtocol `pulumi:"protocol"`
Region string `pulumi:"region"`
// An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
RequestId *string `pulumi:"requestId"`
// This field specifies the security settings that apply to this backend service. This field is applicable to a global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
SecuritySettings *SecuritySettings `pulumi:"securitySettings"`
// URLs of networkservices.ServiceBinding resources. Can only be set if load balancing scheme is INTERNAL_SELF_MANAGED. If set, lists of backends and health checks must be both empty.
ServiceBindings []string `pulumi:"serviceBindings"`
// URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
ServiceLbPolicy *string `pulumi:"serviceLbPolicy"`
// Type of session affinity to use. The default is NONE. Only NONE and HEADER_FIELD are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. For more details, see: [Session Affinity](https://cloud.google.com/load-balancing/docs/backend-service#session_affinity).
SessionAffinity *RegionBackendServiceSessionAffinity `pulumi:"sessionAffinity"`
Subsetting *Subsetting `pulumi:"subsetting"`
// The backend service timeout has a different meaning depending on the type of load balancer. For more information see, Backend service settings. The default is 30 seconds. The full range of timeout values allowed goes from 1 through 2,147,483,647 seconds. This value can be overridden in the PathMatcher configuration of the UrlMap that references this backend service. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. Instead, use maxStreamDuration.
TimeoutSec *int `pulumi:"timeoutSec"`
UsedBy []BackendServiceUsedBy `pulumi:"usedBy"`
}
// The set of arguments for constructing a RegionBackendService resource.
type RegionBackendServiceArgs struct {
// Lifetime of cookies in seconds. This setting is applicable to external and internal HTTP(S) load balancers and Traffic Director and requires GENERATED_COOKIE or HTTP_COOKIE session affinity. If set to 0, the cookie is non-persistent and lasts only until the end of the browser session (or equivalent). The maximum allowed value is two weeks (1,209,600). Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
AffinityCookieTtlSec pulumi.IntPtrInput
// The list of backends that serve this BackendService.
Backends BackendArrayInput
// Cloud CDN configuration for this BackendService. Only available for specified load balancer types.
CdnPolicy BackendServiceCdnPolicyPtrInput
CircuitBreakers CircuitBreakersPtrInput
// Compress text responses using Brotli or gzip compression, based on the client's Accept-Encoding header.
CompressionMode RegionBackendServiceCompressionModePtrInput
ConnectionDraining ConnectionDrainingPtrInput
// Connection Tracking configuration for this BackendService. Connection tracking policy settings are only available for Network Load Balancing and Internal TCP/UDP Load Balancing.
ConnectionTrackingPolicy BackendServiceConnectionTrackingPolicyPtrInput
// Consistent Hash-based load balancing can be used to provide soft session affinity based on HTTP headers, cookies or other properties. This load balancing policy is applicable only for HTTP connections. The affinity to a particular destination host will be lost when one or more hosts are added/removed from the destination service. This field specifies parameters that control consistent hashing. This field is only applicable when localityLbPolicy is set to MAGLEV or RING_HASH. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
ConsistentHash ConsistentHashLoadBalancerSettingsPtrInput
// Headers that the load balancer adds to proxied requests. See [Creating custom headers](https://cloud.google.com/load-balancing/docs/custom-headers).
CustomRequestHeaders pulumi.StringArrayInput
// Headers that the load balancer adds to proxied responses. See [Creating custom headers](https://cloud.google.com/load-balancing/docs/custom-headers).
CustomResponseHeaders pulumi.StringArrayInput
// An optional description of this resource. Provide this property when you create the resource.
Description pulumi.StringPtrInput
// If true, enables Cloud CDN for the backend service of an external HTTP(S) load balancer.
EnableCDN pulumi.BoolPtrInput
// Requires at least one backend instance group to be defined as a backup (failover) backend. For load balancers that have configurable failover: [Internal TCP/UDP Load Balancing](https://cloud.google.com/load-balancing/docs/internal/failover-overview) and [external TCP/UDP Load Balancing](https://cloud.google.com/load-balancing/docs/network/networklb-failover-overview).
FailoverPolicy BackendServiceFailoverPolicyPtrInput
// The list of URLs to the healthChecks, httpHealthChecks (legacy), or httpsHealthChecks (legacy) resource for health checking this backend service. Not all backend services support legacy health checks. See Load balancer guide. Currently, at most one health check can be specified for each backend service. Backend services with instance group or zonal NEG backends must have a health check. Backend services with internet or serverless NEG backends must not have a health check.
HealthChecks pulumi.StringArrayInput
// The configurations for Identity-Aware Proxy on this resource. Not available for Internal TCP/UDP Load Balancing and Network Load Balancing.
Iap BackendServiceIAPPtrInput
// Specifies a preference for traffic sent from the proxy to the backend (or from the client to the backend for proxyless gRPC). The possible values are: - IPV4_ONLY: Only send IPv4 traffic to the backends of the backend service (Instance Group, Managed Instance Group, Network Endpoint Group), regardless of traffic from the client to the proxy. Only IPv4 health checks are used to check the health of the backends. This is the default setting. - PREFER_IPV6: Prioritize the connection to the endpoint's IPv6 address over its IPv4 address (provided there is a healthy IPv6 address). - IPV6_ONLY: Only send IPv6 traffic to the backends of the backend service (Instance Group, Managed Instance Group, Network Endpoint Group), regardless of traffic from the client to the proxy. Only IPv6 health checks are used to check the health of the backends. This field is applicable to either: - Advanced Global External HTTPS Load Balancing (load balancing scheme EXTERNAL_MANAGED), - Regional External HTTPS Load Balancing, - Internal TCP Proxy (load balancing scheme INTERNAL_MANAGED), - Regional Internal HTTPS Load Balancing (load balancing scheme INTERNAL_MANAGED), - Traffic Director with Envoy proxies and proxyless gRPC (load balancing scheme INTERNAL_SELF_MANAGED).
IpAddressSelectionPolicy RegionBackendServiceIpAddressSelectionPolicyPtrInput
// Specifies the load balancer type. A backend service created for one type of load balancer cannot be used with another. For more information, refer to Choosing a load balancer.
LoadBalancingScheme RegionBackendServiceLoadBalancingSchemePtrInput
// A list of locality load-balancing policies to be used in order of preference. When you use localityLbPolicies, you must set at least one value for either the localityLbPolicies[].policy or the localityLbPolicies[].customPolicy field. localityLbPolicies overrides any value set in the localityLbPolicy field. For an example of how to use this field, see Define a list of preferred policies. Caution: This field and its children are intended for use in a service mesh that includes gRPC clients only. Envoy proxies can't use backend services that have this configuration.
LocalityLbPolicies BackendServiceLocalityLoadBalancingPolicyConfigArrayInput
// The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not NONE, and this field is not set to MAGLEV or RING_HASH, session affinity settings will not take effect. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
LocalityLbPolicy RegionBackendServiceLocalityLbPolicyPtrInput
// This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver.
LogConfig BackendServiceLogConfigPtrInput
// Specifies the default maximum duration (timeout) for streams to this service. Duration is computed from the beginning of the stream until the response has been completely processed, including all retries. A stream that does not complete in this duration is closed. If not specified, there will be no timeout limit, i.e. the maximum duration is infinite. This value can be overridden in the PathMatcher configuration of the UrlMap that references this backend service. This field is only allowed when the loadBalancingScheme of the backend service is INTERNAL_SELF_MANAGED.
MaxStreamDuration DurationPtrInput
// Deployment metadata associated with the resource to be set by a GKE hub controller and read by the backend RCTH
Metadatas pulumi.StringMapInput
// Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Name pulumi.StringPtrInput
// The URL of the network to which this backend service belongs. This field can only be specified when the load balancing scheme is set to INTERNAL.
Network pulumi.StringPtrInput
// Settings controlling the ejection of unhealthy backend endpoints from the load balancing pool of each individual proxy instance that processes the traffic for the given backend service. If not set, this feature is considered disabled. Results of the outlier detection algorithm (ejection of endpoints from the load balancing pool and returning them back to the pool) are executed independently by each proxy instance of the load balancer. In most cases, more than one proxy instance handles the traffic received by a backend service. Thus, it is possible that an unhealthy endpoint is detected and ejected by only some of the proxies, and while this happens, other proxies may continue to send requests to the same unhealthy endpoint until they detect and eject the unhealthy endpoint. Applicable backend endpoints can be: - VM instances in an Instance Group - Endpoints in a Zonal NEG (GCE_VM_IP, GCE_VM_IP_PORT) - Endpoints in a Hybrid Connectivity NEG (NON_GCP_PRIVATE_IP_PORT) - Serverless NEGs, that resolve to Cloud Run, App Engine, or Cloud Functions Services - Private Service Connect NEGs, that resolve to Google-managed regional API endpoints or managed services published using Private Service Connect Applicable backend service types can be: - A global backend service with the loadBalancingScheme set to INTERNAL_SELF_MANAGED or EXTERNAL_MANAGED. - A regional backend service with the serviceProtocol set to HTTP, HTTPS, or HTTP2, and loadBalancingScheme set to INTERNAL_MANAGED or EXTERNAL_MANAGED. Not supported for Serverless NEGs. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
OutlierDetection OutlierDetectionPtrInput
// Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80. For Internal TCP/UDP Load Balancing and Network Load Balancing, omit port.
//
// Deprecated: Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80. For Internal TCP/UDP Load Balancing and Network Load Balancing, omit port.
Port pulumi.IntPtrInput
// A named port on a backend instance group representing the port for communication to the backend VMs in that group. The named port must be [defined on each backend instance group](https://cloud.google.com/load-balancing/docs/backend-service#named_ports). This parameter has no meaning if the backends are NEGs. For Internal TCP/UDP Load Balancing and Network Load Balancing, omit port_name.
PortName pulumi.StringPtrInput
Project pulumi.StringPtrInput
// The protocol this BackendService uses to communicate with backends. Possible values are HTTP, HTTPS, HTTP2, TCP, SSL, UDP or GRPC. depending on the chosen load balancer or Traffic Director configuration. Refer to the documentation for the load balancers or for Traffic Director for more information. Must be set to GRPC when the backend service is referenced by a URL map that is bound to target gRPC proxy.
Protocol RegionBackendServiceProtocolPtrInput
Region pulumi.StringInput
// An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
RequestId pulumi.StringPtrInput
// This field specifies the security settings that apply to this backend service. This field is applicable to a global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
SecuritySettings SecuritySettingsPtrInput
// URLs of networkservices.ServiceBinding resources. Can only be set if load balancing scheme is INTERNAL_SELF_MANAGED. If set, lists of backends and health checks must be both empty.
ServiceBindings pulumi.StringArrayInput
// URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
ServiceLbPolicy pulumi.StringPtrInput
// Type of session affinity to use. The default is NONE. Only NONE and HEADER_FIELD are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. For more details, see: [Session Affinity](https://cloud.google.com/load-balancing/docs/backend-service#session_affinity).
SessionAffinity RegionBackendServiceSessionAffinityPtrInput
Subsetting SubsettingPtrInput
// The backend service timeout has a different meaning depending on the type of load balancer. For more information see, Backend service settings. The default is 30 seconds. The full range of timeout values allowed goes from 1 through 2,147,483,647 seconds. This value can be overridden in the PathMatcher configuration of the UrlMap that references this backend service. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. Instead, use maxStreamDuration.
TimeoutSec pulumi.IntPtrInput
UsedBy BackendServiceUsedByArrayInput
}
func (RegionBackendServiceArgs) ElementType() reflect.Type {
return reflect.TypeOf((*regionBackendServiceArgs)(nil)).Elem()
}
type RegionBackendServiceInput interface {
pulumi.Input
ToRegionBackendServiceOutput() RegionBackendServiceOutput
ToRegionBackendServiceOutputWithContext(ctx context.Context) RegionBackendServiceOutput
}
func (*RegionBackendService) ElementType() reflect.Type {
return reflect.TypeOf((**RegionBackendService)(nil)).Elem()
}
func (i *RegionBackendService) ToRegionBackendServiceOutput() RegionBackendServiceOutput {
return i.ToRegionBackendServiceOutputWithContext(context.Background())
}
func (i *RegionBackendService) ToRegionBackendServiceOutputWithContext(ctx context.Context) RegionBackendServiceOutput {
return pulumi.ToOutputWithContext(ctx, i).(RegionBackendServiceOutput)
}
type RegionBackendServiceOutput struct{ *pulumi.OutputState }
func (RegionBackendServiceOutput) ElementType() reflect.Type {
return reflect.TypeOf((**RegionBackendService)(nil)).Elem()
}
func (o RegionBackendServiceOutput) ToRegionBackendServiceOutput() RegionBackendServiceOutput {
return o
}
func (o RegionBackendServiceOutput) ToRegionBackendServiceOutputWithContext(ctx context.Context) RegionBackendServiceOutput {
return o
}
// Lifetime of cookies in seconds. This setting is applicable to external and internal HTTP(S) load balancers and Traffic Director and requires GENERATED_COOKIE or HTTP_COOKIE session affinity. If set to 0, the cookie is non-persistent and lasts only until the end of the browser session (or equivalent). The maximum allowed value is two weeks (1,209,600). Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
func (o RegionBackendServiceOutput) AffinityCookieTtlSec() pulumi.IntOutput {
return o.ApplyT(func(v *RegionBackendService) pulumi.IntOutput { return v.AffinityCookieTtlSec }).(pulumi.IntOutput)
}
// The list of backends that serve this BackendService.
func (o RegionBackendServiceOutput) Backends() BackendResponseArrayOutput {
return o.ApplyT(func(v *RegionBackendService) BackendResponseArrayOutput { return v.Backends }).(BackendResponseArrayOutput)
}
// Cloud CDN configuration for this BackendService. Only available for specified load balancer types.
func (o RegionBackendServiceOutput) CdnPolicy() BackendServiceCdnPolicyResponseOutput {
return o.ApplyT(func(v *RegionBackendService) BackendServiceCdnPolicyResponseOutput { return v.CdnPolicy }).(BackendServiceCdnPolicyResponseOutput)
}
func (o RegionBackendServiceOutput) CircuitBreakers() CircuitBreakersResponseOutput {
return o.ApplyT(func(v *RegionBackendService) CircuitBreakersResponseOutput { return v.CircuitBreakers }).(CircuitBreakersResponseOutput)
}
// Compress text responses using Brotli or gzip compression, based on the client's Accept-Encoding header.
func (o RegionBackendServiceOutput) CompressionMode() pulumi.StringOutput {
return o.ApplyT(func(v *RegionBackendService) pulumi.StringOutput { return v.CompressionMode }).(pulumi.StringOutput)
}
func (o RegionBackendServiceOutput) ConnectionDraining() ConnectionDrainingResponseOutput {
return o.ApplyT(func(v *RegionBackendService) ConnectionDrainingResponseOutput { return v.ConnectionDraining }).(ConnectionDrainingResponseOutput)
}
// Connection Tracking configuration for this BackendService. Connection tracking policy settings are only available for Network Load Balancing and Internal TCP/UDP Load Balancing.
func (o RegionBackendServiceOutput) ConnectionTrackingPolicy() BackendServiceConnectionTrackingPolicyResponseOutput {
return o.ApplyT(func(v *RegionBackendService) BackendServiceConnectionTrackingPolicyResponseOutput {
return v.ConnectionTrackingPolicy
}).(BackendServiceConnectionTrackingPolicyResponseOutput)
}
// Consistent Hash-based load balancing can be used to provide soft session affinity based on HTTP headers, cookies or other properties. This load balancing policy is applicable only for HTTP connections. The affinity to a particular destination host will be lost when one or more hosts are added/removed from the destination service. This field specifies parameters that control consistent hashing. This field is only applicable when localityLbPolicy is set to MAGLEV or RING_HASH. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
func (o RegionBackendServiceOutput) ConsistentHash() ConsistentHashLoadBalancerSettingsResponseOutput {
return o.ApplyT(func(v *RegionBackendService) ConsistentHashLoadBalancerSettingsResponseOutput {
return v.ConsistentHash
}).(ConsistentHashLoadBalancerSettingsResponseOutput)
}
// Creation timestamp in RFC3339 text format.
func (o RegionBackendServiceOutput) CreationTimestamp() pulumi.StringOutput {
return o.ApplyT(func(v *RegionBackendService) pulumi.StringOutput { return v.CreationTimestamp }).(pulumi.StringOutput)
}
// Headers that the load balancer adds to proxied requests. See [Creating custom headers](https://cloud.google.com/load-balancing/docs/custom-headers).
func (o RegionBackendServiceOutput) CustomRequestHeaders() pulumi.StringArrayOutput {
return o.ApplyT(func(v *RegionBackendService) pulumi.StringArrayOutput { return v.CustomRequestHeaders }).(pulumi.StringArrayOutput)
}
// Headers that the load balancer adds to proxied responses. See [Creating custom headers](https://cloud.google.com/load-balancing/docs/custom-headers).
func (o RegionBackendServiceOutput) CustomResponseHeaders() pulumi.StringArrayOutput {
return o.ApplyT(func(v *RegionBackendService) pulumi.StringArrayOutput { return v.CustomResponseHeaders }).(pulumi.StringArrayOutput)
}
// An optional description of this resource. Provide this property when you create the resource.
func (o RegionBackendServiceOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v *RegionBackendService) pulumi.StringOutput { return v.Description }).(pulumi.StringOutput)
}
// The resource URL for the edge security policy associated with this backend service.
func (o RegionBackendServiceOutput) EdgeSecurityPolicy() pulumi.StringOutput {
return o.ApplyT(func(v *RegionBackendService) pulumi.StringOutput { return v.EdgeSecurityPolicy }).(pulumi.StringOutput)
}
// If true, enables Cloud CDN for the backend service of an external HTTP(S) load balancer.
func (o RegionBackendServiceOutput) EnableCDN() pulumi.BoolOutput {
return o.ApplyT(func(v *RegionBackendService) pulumi.BoolOutput { return v.EnableCDN }).(pulumi.BoolOutput)
}
// Requires at least one backend instance group to be defined as a backup (failover) backend. For load balancers that have configurable failover: [Internal TCP/UDP Load Balancing](https://cloud.google.com/load-balancing/docs/internal/failover-overview) and [external TCP/UDP Load Balancing](https://cloud.google.com/load-balancing/docs/network/networklb-failover-overview).
func (o RegionBackendServiceOutput) FailoverPolicy() BackendServiceFailoverPolicyResponseOutput {
return o.ApplyT(func(v *RegionBackendService) BackendServiceFailoverPolicyResponseOutput { return v.FailoverPolicy }).(BackendServiceFailoverPolicyResponseOutput)
}
// Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a BackendService. An up-to-date fingerprint must be provided in order to update the BackendService, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a BackendService.
func (o RegionBackendServiceOutput) Fingerprint() pulumi.StringOutput {
return o.ApplyT(func(v *RegionBackendService) pulumi.StringOutput { return v.Fingerprint }).(pulumi.StringOutput)
}
// The list of URLs to the healthChecks, httpHealthChecks (legacy), or httpsHealthChecks (legacy) resource for health checking this backend service. Not all backend services support legacy health checks. See Load balancer guide. Currently, at most one health check can be specified for each backend service. Backend services with instance group or zonal NEG backends must have a health check. Backend services with internet or serverless NEG backends must not have a health check.
func (o RegionBackendServiceOutput) HealthChecks() pulumi.StringArrayOutput {
return o.ApplyT(func(v *RegionBackendService) pulumi.StringArrayOutput { return v.HealthChecks }).(pulumi.StringArrayOutput)
}
// The configurations for Identity-Aware Proxy on this resource. Not available for Internal TCP/UDP Load Balancing and Network Load Balancing.
func (o RegionBackendServiceOutput) Iap() BackendServiceIAPResponseOutput {
return o.ApplyT(func(v *RegionBackendService) BackendServiceIAPResponseOutput { return v.Iap }).(BackendServiceIAPResponseOutput)
}
// Specifies a preference for traffic sent from the proxy to the backend (or from the client to the backend for proxyless gRPC). The possible values are: - IPV4_ONLY: Only send IPv4 traffic to the backends of the backend service (Instance Group, Managed Instance Group, Network Endpoint Group), regardless of traffic from the client to the proxy. Only IPv4 health checks are used to check the health of the backends. This is the default setting. - PREFER_IPV6: Prioritize the connection to the endpoint's IPv6 address over its IPv4 address (provided there is a healthy IPv6 address). - IPV6_ONLY: Only send IPv6 traffic to the backends of the backend service (Instance Group, Managed Instance Group, Network Endpoint Group), regardless of traffic from the client to the proxy. Only IPv6 health checks are used to check the health of the backends. This field is applicable to either: - Advanced Global External HTTPS Load Balancing (load balancing scheme EXTERNAL_MANAGED), - Regional External HTTPS Load Balancing, - Internal TCP Proxy (load balancing scheme INTERNAL_MANAGED), - Regional Internal HTTPS Load Balancing (load balancing scheme INTERNAL_MANAGED), - Traffic Director with Envoy proxies and proxyless gRPC (load balancing scheme INTERNAL_SELF_MANAGED).
func (o RegionBackendServiceOutput) IpAddressSelectionPolicy() pulumi.StringOutput {
return o.ApplyT(func(v *RegionBackendService) pulumi.StringOutput { return v.IpAddressSelectionPolicy }).(pulumi.StringOutput)
}
// Type of resource. Always compute#backendService for backend services.
func (o RegionBackendServiceOutput) Kind() pulumi.StringOutput {
return o.ApplyT(func(v *RegionBackendService) pulumi.StringOutput { return v.Kind }).(pulumi.StringOutput)
}
// Specifies the load balancer type. A backend service created for one type of load balancer cannot be used with another. For more information, refer to Choosing a load balancer.
func (o RegionBackendServiceOutput) LoadBalancingScheme() pulumi.StringOutput {
return o.ApplyT(func(v *RegionBackendService) pulumi.StringOutput { return v.LoadBalancingScheme }).(pulumi.StringOutput)
}
// A list of locality load-balancing policies to be used in order of preference. When you use localityLbPolicies, you must set at least one value for either the localityLbPolicies[].policy or the localityLbPolicies[].customPolicy field. localityLbPolicies overrides any value set in the localityLbPolicy field. For an example of how to use this field, see Define a list of preferred policies. Caution: This field and its children are intended for use in a service mesh that includes gRPC clients only. Envoy proxies can't use backend services that have this configuration.
func (o RegionBackendServiceOutput) LocalityLbPolicies() BackendServiceLocalityLoadBalancingPolicyConfigResponseArrayOutput {
return o.ApplyT(func(v *RegionBackendService) BackendServiceLocalityLoadBalancingPolicyConfigResponseArrayOutput {
return v.LocalityLbPolicies
}).(BackendServiceLocalityLoadBalancingPolicyConfigResponseArrayOutput)
}
// The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not NONE, and this field is not set to MAGLEV or RING_HASH, session affinity settings will not take effect. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
func (o RegionBackendServiceOutput) LocalityLbPolicy() pulumi.StringOutput {
return o.ApplyT(func(v *RegionBackendService) pulumi.StringOutput { return v.LocalityLbPolicy }).(pulumi.StringOutput)
}
// This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver.
func (o RegionBackendServiceOutput) LogConfig() BackendServiceLogConfigResponseOutput {
return o.ApplyT(func(v *RegionBackendService) BackendServiceLogConfigResponseOutput { return v.LogConfig }).(BackendServiceLogConfigResponseOutput)
}
// Specifies the default maximum duration (timeout) for streams to this service. Duration is computed from the beginning of the stream until the response has been completely processed, including all retries. A stream that does not complete in this duration is closed. If not specified, there will be no timeout limit, i.e. the maximum duration is infinite. This value can be overridden in the PathMatcher configuration of the UrlMap that references this backend service. This field is only allowed when the loadBalancingScheme of the backend service is INTERNAL_SELF_MANAGED.
func (o RegionBackendServiceOutput) MaxStreamDuration() DurationResponseOutput {
return o.ApplyT(func(v *RegionBackendService) DurationResponseOutput { return v.MaxStreamDuration }).(DurationResponseOutput)
}
// Deployment metadata associated with the resource to be set by a GKE hub controller and read by the backend RCTH
func (o RegionBackendServiceOutput) Metadatas() pulumi.StringMapOutput {
return o.ApplyT(func(v *RegionBackendService) pulumi.StringMapOutput { return v.Metadatas }).(pulumi.StringMapOutput)
}
// Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
func (o RegionBackendServiceOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *RegionBackendService) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The URL of the network to which this backend service belongs. This field can only be specified when the load balancing scheme is set to INTERNAL.
func (o RegionBackendServiceOutput) Network() pulumi.StringOutput {
return o.ApplyT(func(v *RegionBackendService) pulumi.StringOutput { return v.Network }).(pulumi.StringOutput)
}
// Settings controlling the ejection of unhealthy backend endpoints from the load balancing pool of each individual proxy instance that processes the traffic for the given backend service. If not set, this feature is considered disabled. Results of the outlier detection algorithm (ejection of endpoints from the load balancing pool and returning them back to the pool) are executed independently by each proxy instance of the load balancer. In most cases, more than one proxy instance handles the traffic received by a backend service. Thus, it is possible that an unhealthy endpoint is detected and ejected by only some of the proxies, and while this happens, other proxies may continue to send requests to the same unhealthy endpoint until they detect and eject the unhealthy endpoint. Applicable backend endpoints can be: - VM instances in an Instance Group - Endpoints in a Zonal NEG (GCE_VM_IP, GCE_VM_IP_PORT) - Endpoints in a Hybrid Connectivity NEG (NON_GCP_PRIVATE_IP_PORT) - Serverless NEGs, that resolve to Cloud Run, App Engine, or Cloud Functions Services - Private Service Connect NEGs, that resolve to Google-managed regional API endpoints or managed services published using Private Service Connect Applicable backend service types can be: - A global backend service with the loadBalancingScheme set to INTERNAL_SELF_MANAGED or EXTERNAL_MANAGED. - A regional backend service with the serviceProtocol set to HTTP, HTTPS, or HTTP2, and loadBalancingScheme set to INTERNAL_MANAGED or EXTERNAL_MANAGED. Not supported for Serverless NEGs. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
func (o RegionBackendServiceOutput) OutlierDetection() OutlierDetectionResponseOutput {
return o.ApplyT(func(v *RegionBackendService) OutlierDetectionResponseOutput { return v.OutlierDetection }).(OutlierDetectionResponseOutput)
}
// Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80. For Internal TCP/UDP Load Balancing and Network Load Balancing, omit port.
//
// Deprecated: Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80. For Internal TCP/UDP Load Balancing and Network Load Balancing, omit port.
func (o RegionBackendServiceOutput) Port() pulumi.IntOutput {
return o.ApplyT(func(v *RegionBackendService) pulumi.IntOutput { return v.Port }).(pulumi.IntOutput)
}
// A named port on a backend instance group representing the port for communication to the backend VMs in that group. The named port must be [defined on each backend instance group](https://cloud.google.com/load-balancing/docs/backend-service#named_ports). This parameter has no meaning if the backends are NEGs. For Internal TCP/UDP Load Balancing and Network Load Balancing, omit port_name.
func (o RegionBackendServiceOutput) PortName() pulumi.StringOutput {
return o.ApplyT(func(v *RegionBackendService) pulumi.StringOutput { return v.PortName }).(pulumi.StringOutput)
}
func (o RegionBackendServiceOutput) Project() pulumi.StringOutput {
return o.ApplyT(func(v *RegionBackendService) pulumi.StringOutput { return v.Project }).(pulumi.StringOutput)
}
// The protocol this BackendService uses to communicate with backends. Possible values are HTTP, HTTPS, HTTP2, TCP, SSL, UDP or GRPC. depending on the chosen load balancer or Traffic Director configuration. Refer to the documentation for the load balancers or for Traffic Director for more information. Must be set to GRPC when the backend service is referenced by a URL map that is bound to target gRPC proxy.
func (o RegionBackendServiceOutput) Protocol() pulumi.StringOutput {
return o.ApplyT(func(v *RegionBackendService) pulumi.StringOutput { return v.Protocol }).(pulumi.StringOutput)
}
func (o RegionBackendServiceOutput) Region() pulumi.StringOutput {
return o.ApplyT(func(v *RegionBackendService) pulumi.StringOutput { return v.Region }).(pulumi.StringOutput)
}
// An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
func (o RegionBackendServiceOutput) RequestId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *RegionBackendService) pulumi.StringPtrOutput { return v.RequestId }).(pulumi.StringPtrOutput)
}
// The resource URL for the security policy associated with this backend service.
func (o RegionBackendServiceOutput) SecurityPolicy() pulumi.StringOutput {
return o.ApplyT(func(v *RegionBackendService) pulumi.StringOutput { return v.SecurityPolicy }).(pulumi.StringOutput)
}
// This field specifies the security settings that apply to this backend service. This field is applicable to a global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
func (o RegionBackendServiceOutput) SecuritySettings() SecuritySettingsResponseOutput {
return o.ApplyT(func(v *RegionBackendService) SecuritySettingsResponseOutput { return v.SecuritySettings }).(SecuritySettingsResponseOutput)
}
// Server-defined URL for the resource.
func (o RegionBackendServiceOutput) SelfLink() pulumi.StringOutput {
return o.ApplyT(func(v *RegionBackendService) pulumi.StringOutput { return v.SelfLink }).(pulumi.StringOutput)
}
// URLs of networkservices.ServiceBinding resources. Can only be set if load balancing scheme is INTERNAL_SELF_MANAGED. If set, lists of backends and health checks must be both empty.
func (o RegionBackendServiceOutput) ServiceBindings() pulumi.StringArrayOutput {
return o.ApplyT(func(v *RegionBackendService) pulumi.StringArrayOutput { return v.ServiceBindings }).(pulumi.StringArrayOutput)
}
// URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
func (o RegionBackendServiceOutput) ServiceLbPolicy() pulumi.StringOutput {
return o.ApplyT(func(v *RegionBackendService) pulumi.StringOutput { return v.ServiceLbPolicy }).(pulumi.StringOutput)
}
// Type of session affinity to use. The default is NONE. Only NONE and HEADER_FIELD are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. For more details, see: [Session Affinity](https://cloud.google.com/load-balancing/docs/backend-service#session_affinity).
func (o RegionBackendServiceOutput) SessionAffinity() pulumi.StringOutput {
return o.ApplyT(func(v *RegionBackendService) pulumi.StringOutput { return v.SessionAffinity }).(pulumi.StringOutput)
}
func (o RegionBackendServiceOutput) Subsetting() SubsettingResponseOutput {
return o.ApplyT(func(v *RegionBackendService) SubsettingResponseOutput { return v.Subsetting }).(SubsettingResponseOutput)
}
// The backend service timeout has a different meaning depending on the type of load balancer. For more information see, Backend service settings. The default is 30 seconds. The full range of timeout values allowed goes from 1 through 2,147,483,647 seconds. This value can be overridden in the PathMatcher configuration of the UrlMap that references this backend service. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. Instead, use maxStreamDuration.
func (o RegionBackendServiceOutput) TimeoutSec() pulumi.IntOutput {
return o.ApplyT(func(v *RegionBackendService) pulumi.IntOutput { return v.TimeoutSec }).(pulumi.IntOutput)
}
func (o RegionBackendServiceOutput) UsedBy() BackendServiceUsedByResponseArrayOutput {
return o.ApplyT(func(v *RegionBackendService) BackendServiceUsedByResponseArrayOutput { return v.UsedBy }).(BackendServiceUsedByResponseArrayOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*RegionBackendServiceInput)(nil)).Elem(), &RegionBackendService{})
pulumi.RegisterOutputType(RegionBackendServiceOutput{})
}