-
Notifications
You must be signed in to change notification settings - Fork 64
/
zz_forwardingrule_types.go
executable file
·733 lines (608 loc) · 38 KB
/
zz_forwardingrule_types.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
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
// SPDX-FileCopyrightText: 2024 The Crossplane Authors <https://crossplane.io>
//
// SPDX-License-Identifier: Apache-2.0
// Code generated by upjet. DO NOT EDIT.
package v1beta1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
v1 "github.com/crossplane/crossplane-runtime/apis/common/v1"
)
type ForwardingRuleInitParameters struct {
// The ports, portRange, and allPorts fields are mutually exclusive.
// Only packets addressed to ports in the specified range will be forwarded
// to the backends configured with this forwarding rule.
// The allPorts field has the following limitations:
AllPorts *bool `json:"allPorts,omitempty" tf:"all_ports,omitempty"`
// This field is used along with the backend_service field for
// internal load balancing or with the target field for internal
// TargetInstance.
// If the field is set to TRUE, clients can access ILB from all
// regions.
// Otherwise only allows access from clients in the same region as the
// internal load balancer.
AllowGlobalAccess *bool `json:"allowGlobalAccess,omitempty" tf:"allow_global_access,omitempty"`
// This is used in PSC consumer ForwardingRule to control whether the PSC endpoint can be accessed from another region.
AllowPscGlobalAccess *bool `json:"allowPscGlobalAccess,omitempty" tf:"allow_psc_global_access,omitempty"`
// Identifies the backend service to which the forwarding rule sends traffic.
// Required for Internal TCP/UDP Load Balancing and Network Load Balancing;
// must be omitted for all other load balancer types.
// +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/compute/v1beta1.RegionBackendService
// +crossplane:generate:reference:extractor=github.com/upbound/provider-gcp/config/common.SelfLinkExtractor()
BackendService *string `json:"backendService,omitempty" tf:"backend_service,omitempty"`
// Reference to a RegionBackendService in compute to populate backendService.
// +kubebuilder:validation:Optional
BackendServiceRef *v1.Reference `json:"backendServiceRef,omitempty" tf:"-"`
// Selector for a RegionBackendService in compute to populate backendService.
// +kubebuilder:validation:Optional
BackendServiceSelector *v1.Selector `json:"backendServiceSelector,omitempty" tf:"-"`
// An optional description of this resource. Provide this property when
// you create the resource.
Description *string `json:"description,omitempty" tf:"description,omitempty"`
// IP address for which this forwarding rule accepts traffic. When a client
// sends traffic to this IP address, the forwarding rule directs the traffic
// to the referenced target or backendService.
// While creating a forwarding rule, specifying an IPAddress is
// required under the following circumstances:
// +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/compute/v1beta1.Address
// +crossplane:generate:reference:extractor=github.com/upbound/provider-gcp/config/common.SelfLinkExtractor()
IPAddress *string `json:"ipAddress,omitempty" tf:"ip_address,omitempty"`
// Reference to a Address in compute to populate ipAddress.
// +kubebuilder:validation:Optional
IPAddressRef *v1.Reference `json:"ipAddressRef,omitempty" tf:"-"`
// Selector for a Address in compute to populate ipAddress.
// +kubebuilder:validation:Optional
IPAddressSelector *v1.Selector `json:"ipAddressSelector,omitempty" tf:"-"`
// The IP protocol to which this rule applies.
// For protocol forwarding, valid
// options are TCP, UDP, ESP,
// AH, SCTP, ICMP and
// L3_DEFAULT.
// The valid IP protocols are different for different load balancing products
// as described in Load balancing
// features.
// A Forwarding Rule with protocol L3_DEFAULT can attach with target instance or
// backend service with UNSPECIFIED protocol.
// A forwarding rule with "L3_DEFAULT" IPProtocal cannot be attached to a backend service with TCP or UDP.
// Possible values are: TCP, UDP, ESP, AH, SCTP, ICMP, L3_DEFAULT.
IPProtocol *string `json:"ipProtocol,omitempty" tf:"ip_protocol,omitempty"`
// The IP address version that will be used by this forwarding rule.
// Valid options are IPV4 and IPV6.
// If not set, the IPv4 address will be used by default.
// Possible values are: IPV4, IPV6.
IPVersion *string `json:"ipVersion,omitempty" tf:"ip_version,omitempty"`
// Indicates whether or not this load balancer can be used as a collector for
// packet mirroring. To prevent mirroring loops, instances behind this
// load balancer will not have their traffic mirrored even if a
// PacketMirroring rule applies to them.
// This can only be set to true for load balancers that have their
// loadBalancingScheme set to INTERNAL.
IsMirroringCollector *bool `json:"isMirroringCollector,omitempty" tf:"is_mirroring_collector,omitempty"`
// Labels to apply to this forwarding rule. A list of key->value pairs.
// +mapType=granular
Labels map[string]*string `json:"labels,omitempty" tf:"labels,omitempty"`
// Specifies the forwarding rule type.
// For more information about forwarding rules, refer to
// Forwarding rule concepts.
// Default value is EXTERNAL.
// Possible values are: EXTERNAL, EXTERNAL_MANAGED, INTERNAL, INTERNAL_MANAGED.
LoadBalancingScheme *string `json:"loadBalancingScheme,omitempty" tf:"load_balancing_scheme,omitempty"`
// This field is not used for external load balancing.
// For Internal TCP/UDP Load Balancing, this field identifies the network that
// the load balanced IP should belong to for this Forwarding Rule.
// If the subnetwork is specified, the network of the subnetwork will be used.
// If neither subnetwork nor this field is specified, the default network will
// be used.
// For Private Service Connect forwarding rules that forward traffic to Google
// APIs, a network must be provided.
// +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/compute/v1beta1.Network
// +crossplane:generate:reference:extractor=github.com/upbound/provider-gcp/config/common.SelfLinkExtractor()
Network *string `json:"network,omitempty" tf:"network,omitempty"`
// Reference to a Network in compute to populate network.
// +kubebuilder:validation:Optional
NetworkRef *v1.Reference `json:"networkRef,omitempty" tf:"-"`
// Selector for a Network in compute to populate network.
// +kubebuilder:validation:Optional
NetworkSelector *v1.Selector `json:"networkSelector,omitempty" tf:"-"`
// This signifies the networking tier used for configuring
// this load balancer and can only take the following values:
// PREMIUM, STANDARD.
// For regional ForwardingRule, the valid values are PREMIUM and
// STANDARD. For GlobalForwardingRule, the valid value is
// PREMIUM.
// If this field is not specified, it is assumed to be PREMIUM.
// If IPAddress is specified, this value must be equal to the
// networkTier of the Address.
// Possible values are: PREMIUM, STANDARD.
NetworkTier *string `json:"networkTier,omitempty" tf:"network_tier,omitempty"`
// This is used in PSC consumer ForwardingRule to control whether it should try to auto-generate a DNS zone or not. Non-PSC forwarding rules do not use this field.
NoAutomateDNSZone *bool `json:"noAutomateDnsZone,omitempty" tf:"no_automate_dns_zone,omitempty"`
// The ports, portRange, and allPorts fields are mutually exclusive.
// Only packets addressed to ports in the specified range will be forwarded
// to the backends configured with this forwarding rule.
// The portRange field has the following limitations:
PortRange *string `json:"portRange,omitempty" tf:"port_range,omitempty"`
// The ports, portRange, and allPorts fields are mutually exclusive.
// Only packets addressed to ports in the specified range will be forwarded
// to the backends configured with this forwarding rule.
// The ports field has the following limitations:
// +listType=set
Ports []*string `json:"ports,omitempty" tf:"ports,omitempty"`
// The ID of the project in which the resource belongs.
// If it is not provided, the provider project is used.
Project *string `json:"project,omitempty" tf:"project,omitempty"`
// this is used in psc consumer forwardingrule to make provider recreate the forwardingrule when the status is closed
RecreateClosedPsc *bool `json:"recreateClosedPsc,omitempty" tf:"recreate_closed_psc,omitempty"`
// Service Directory resources to register this forwarding rule with.
// Currently, only supports a single Service Directory resource.
// Structure is documented below.
ServiceDirectoryRegistrations []ServiceDirectoryRegistrationsInitParameters `json:"serviceDirectoryRegistrations,omitempty" tf:"service_directory_registrations,omitempty"`
// An optional prefix to the service name for this Forwarding Rule.
// If specified, will be the first label of the fully qualified service
// name.
// The label must be 1-63 characters long, and comply with RFC1035.
// Specifically, the label 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.
// This field is only used for INTERNAL load balancing.
ServiceLabel *string `json:"serviceLabel,omitempty" tf:"service_label,omitempty"`
// If not empty, this Forwarding Rule will only forward the traffic when the source IP address matches one of the IP addresses or CIDR ranges set here. Note that a Forwarding Rule can only have up to 64 source IP ranges, and this field can only be used with a regional Forwarding Rule whose scheme is EXTERNAL. Each sourceIpRange entry should be either an IP address (for example, 1.2.3.4) or a CIDR range (for example, 1.2.3.0/24).
SourceIPRanges []*string `json:"sourceIpRanges,omitempty" tf:"source_ip_ranges,omitempty"`
// This field identifies the subnetwork that the load balanced IP should
// belong to for this Forwarding Rule, used in internal load balancing and
// network load balancing with IPv6.
// If the network specified is in auto subnet mode, this field is optional.
// However, a subnetwork must be specified if the network is in custom subnet
// mode or when creating external forwarding rule with IPv6.
// +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/compute/v1beta1.Subnetwork
// +crossplane:generate:reference:extractor=github.com/upbound/provider-gcp/config/common.SelfLinkExtractor()
Subnetwork *string `json:"subnetwork,omitempty" tf:"subnetwork,omitempty"`
// Reference to a Subnetwork in compute to populate subnetwork.
// +kubebuilder:validation:Optional
SubnetworkRef *v1.Reference `json:"subnetworkRef,omitempty" tf:"-"`
// Selector for a Subnetwork in compute to populate subnetwork.
// +kubebuilder:validation:Optional
SubnetworkSelector *v1.Selector `json:"subnetworkSelector,omitempty" tf:"-"`
// is set to targetGrpcProxy and
// validateForProxyless is set to true, the
// IPAddress should be set to 0.0.0.0.
// +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/compute/v1beta1.RegionTargetHTTPProxy
// +crossplane:generate:reference:extractor=github.com/upbound/provider-gcp/config/common.SelfLinkExtractor()
Target *string `json:"target,omitempty" tf:"target,omitempty"`
// Reference to a RegionTargetHTTPProxy in compute to populate target.
// +kubebuilder:validation:Optional
TargetRef *v1.Reference `json:"targetRef,omitempty" tf:"-"`
// Selector for a RegionTargetHTTPProxy in compute to populate target.
// +kubebuilder:validation:Optional
TargetSelector *v1.Selector `json:"targetSelector,omitempty" tf:"-"`
}
type ForwardingRuleObservation struct {
// The ports, portRange, and allPorts fields are mutually exclusive.
// Only packets addressed to ports in the specified range will be forwarded
// to the backends configured with this forwarding rule.
// The allPorts field has the following limitations:
AllPorts *bool `json:"allPorts,omitempty" tf:"all_ports,omitempty"`
// This field is used along with the backend_service field for
// internal load balancing or with the target field for internal
// TargetInstance.
// If the field is set to TRUE, clients can access ILB from all
// regions.
// Otherwise only allows access from clients in the same region as the
// internal load balancer.
AllowGlobalAccess *bool `json:"allowGlobalAccess,omitempty" tf:"allow_global_access,omitempty"`
// This is used in PSC consumer ForwardingRule to control whether the PSC endpoint can be accessed from another region.
AllowPscGlobalAccess *bool `json:"allowPscGlobalAccess,omitempty" tf:"allow_psc_global_access,omitempty"`
// Identifies the backend service to which the forwarding rule sends traffic.
// Required for Internal TCP/UDP Load Balancing and Network Load Balancing;
// must be omitted for all other load balancer types.
BackendService *string `json:"backendService,omitempty" tf:"backend_service,omitempty"`
// [Output Only] The URL for the corresponding base Forwarding Rule. By base Forwarding Rule, we mean the Forwarding Rule that has the same IP address, protocol, and port settings with the current Forwarding Rule, but without sourceIPRanges specified. Always empty if the current Forwarding Rule does not have sourceIPRanges specified.
BaseForwardingRule *string `json:"baseForwardingRule,omitempty" tf:"base_forwarding_rule,omitempty"`
// Creation timestamp in RFC3339 text format.
CreationTimestamp *string `json:"creationTimestamp,omitempty" tf:"creation_timestamp,omitempty"`
// An optional description of this resource. Provide this property when
// you create the resource.
Description *string `json:"description,omitempty" tf:"description,omitempty"`
// for all of the labels present on the resource.
// +mapType=granular
EffectiveLabels map[string]*string `json:"effectiveLabels,omitempty" tf:"effective_labels,omitempty"`
// an identifier for the resource with format projects/{{project}}/regions/{{region}}/forwardingRules/{{name}}
ID *string `json:"id,omitempty" tf:"id,omitempty"`
// IP address for which this forwarding rule accepts traffic. When a client
// sends traffic to this IP address, the forwarding rule directs the traffic
// to the referenced target or backendService.
// While creating a forwarding rule, specifying an IPAddress is
// required under the following circumstances:
IPAddress *string `json:"ipAddress,omitempty" tf:"ip_address,omitempty"`
// The IP protocol to which this rule applies.
// For protocol forwarding, valid
// options are TCP, UDP, ESP,
// AH, SCTP, ICMP and
// L3_DEFAULT.
// The valid IP protocols are different for different load balancing products
// as described in Load balancing
// features.
// A Forwarding Rule with protocol L3_DEFAULT can attach with target instance or
// backend service with UNSPECIFIED protocol.
// A forwarding rule with "L3_DEFAULT" IPProtocal cannot be attached to a backend service with TCP or UDP.
// Possible values are: TCP, UDP, ESP, AH, SCTP, ICMP, L3_DEFAULT.
IPProtocol *string `json:"ipProtocol,omitempty" tf:"ip_protocol,omitempty"`
// The IP address version that will be used by this forwarding rule.
// Valid options are IPV4 and IPV6.
// If not set, the IPv4 address will be used by default.
// Possible values are: IPV4, IPV6.
IPVersion *string `json:"ipVersion,omitempty" tf:"ip_version,omitempty"`
// Indicates whether or not this load balancer can be used as a collector for
// packet mirroring. To prevent mirroring loops, instances behind this
// load balancer will not have their traffic mirrored even if a
// PacketMirroring rule applies to them.
// This can only be set to true for load balancers that have their
// loadBalancingScheme set to INTERNAL.
IsMirroringCollector *bool `json:"isMirroringCollector,omitempty" tf:"is_mirroring_collector,omitempty"`
// The fingerprint used for optimistic locking of this resource. Used
// internally during updates.
LabelFingerprint *string `json:"labelFingerprint,omitempty" tf:"label_fingerprint,omitempty"`
// Labels to apply to this forwarding rule. A list of key->value pairs.
// +mapType=granular
Labels map[string]*string `json:"labels,omitempty" tf:"labels,omitempty"`
// Specifies the forwarding rule type.
// For more information about forwarding rules, refer to
// Forwarding rule concepts.
// Default value is EXTERNAL.
// Possible values are: EXTERNAL, EXTERNAL_MANAGED, INTERNAL, INTERNAL_MANAGED.
LoadBalancingScheme *string `json:"loadBalancingScheme,omitempty" tf:"load_balancing_scheme,omitempty"`
// This field is not used for external load balancing.
// For Internal TCP/UDP Load Balancing, this field identifies the network that
// the load balanced IP should belong to for this Forwarding Rule.
// If the subnetwork is specified, the network of the subnetwork will be used.
// If neither subnetwork nor this field is specified, the default network will
// be used.
// For Private Service Connect forwarding rules that forward traffic to Google
// APIs, a network must be provided.
Network *string `json:"network,omitempty" tf:"network,omitempty"`
// This signifies the networking tier used for configuring
// this load balancer and can only take the following values:
// PREMIUM, STANDARD.
// For regional ForwardingRule, the valid values are PREMIUM and
// STANDARD. For GlobalForwardingRule, the valid value is
// PREMIUM.
// If this field is not specified, it is assumed to be PREMIUM.
// If IPAddress is specified, this value must be equal to the
// networkTier of the Address.
// Possible values are: PREMIUM, STANDARD.
NetworkTier *string `json:"networkTier,omitempty" tf:"network_tier,omitempty"`
// This is used in PSC consumer ForwardingRule to control whether it should try to auto-generate a DNS zone or not. Non-PSC forwarding rules do not use this field.
NoAutomateDNSZone *bool `json:"noAutomateDnsZone,omitempty" tf:"no_automate_dns_zone,omitempty"`
// The ports, portRange, and allPorts fields are mutually exclusive.
// Only packets addressed to ports in the specified range will be forwarded
// to the backends configured with this forwarding rule.
// The portRange field has the following limitations:
PortRange *string `json:"portRange,omitempty" tf:"port_range,omitempty"`
// The ports, portRange, and allPorts fields are mutually exclusive.
// Only packets addressed to ports in the specified range will be forwarded
// to the backends configured with this forwarding rule.
// The ports field has the following limitations:
// +listType=set
Ports []*string `json:"ports,omitempty" tf:"ports,omitempty"`
// The ID of the project in which the resource belongs.
// If it is not provided, the provider project is used.
Project *string `json:"project,omitempty" tf:"project,omitempty"`
// The PSC connection id of the PSC Forwarding Rule.
PscConnectionID *string `json:"pscConnectionId,omitempty" tf:"psc_connection_id,omitempty"`
// The PSC connection status of the PSC Forwarding Rule. Possible values: STATUS_UNSPECIFIED, PENDING, ACCEPTED, REJECTED, CLOSED
PscConnectionStatus *string `json:"pscConnectionStatus,omitempty" tf:"psc_connection_status,omitempty"`
// this is used in psc consumer forwardingrule to make provider recreate the forwardingrule when the status is closed
RecreateClosedPsc *bool `json:"recreateClosedPsc,omitempty" tf:"recreate_closed_psc,omitempty"`
// A reference to the region where the regional forwarding rule resides.
// This field is not applicable to global forwarding rules.
Region *string `json:"region,omitempty" tf:"region,omitempty"`
// The URI of the created resource.
SelfLink *string `json:"selfLink,omitempty" tf:"self_link,omitempty"`
// Service Directory resources to register this forwarding rule with.
// Currently, only supports a single Service Directory resource.
// Structure is documented below.
ServiceDirectoryRegistrations []ServiceDirectoryRegistrationsObservation `json:"serviceDirectoryRegistrations,omitempty" tf:"service_directory_registrations,omitempty"`
// An optional prefix to the service name for this Forwarding Rule.
// If specified, will be the first label of the fully qualified service
// name.
// The label must be 1-63 characters long, and comply with RFC1035.
// Specifically, the label 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.
// This field is only used for INTERNAL load balancing.
ServiceLabel *string `json:"serviceLabel,omitempty" tf:"service_label,omitempty"`
// The internal fully qualified service name for this Forwarding Rule.
// This field is only used for INTERNAL load balancing.
ServiceName *string `json:"serviceName,omitempty" tf:"service_name,omitempty"`
// If not empty, this Forwarding Rule will only forward the traffic when the source IP address matches one of the IP addresses or CIDR ranges set here. Note that a Forwarding Rule can only have up to 64 source IP ranges, and this field can only be used with a regional Forwarding Rule whose scheme is EXTERNAL. Each sourceIpRange entry should be either an IP address (for example, 1.2.3.4) or a CIDR range (for example, 1.2.3.0/24).
SourceIPRanges []*string `json:"sourceIpRanges,omitempty" tf:"source_ip_ranges,omitempty"`
// This field identifies the subnetwork that the load balanced IP should
// belong to for this Forwarding Rule, used in internal load balancing and
// network load balancing with IPv6.
// If the network specified is in auto subnet mode, this field is optional.
// However, a subnetwork must be specified if the network is in custom subnet
// mode or when creating external forwarding rule with IPv6.
Subnetwork *string `json:"subnetwork,omitempty" tf:"subnetwork,omitempty"`
// is set to targetGrpcProxy and
// validateForProxyless is set to true, the
// IPAddress should be set to 0.0.0.0.
Target *string `json:"target,omitempty" tf:"target,omitempty"`
// The combination of labels configured directly on the resource
// and default labels configured on the provider.
// +mapType=granular
TerraformLabels map[string]*string `json:"terraformLabels,omitempty" tf:"terraform_labels,omitempty"`
}
type ForwardingRuleParameters struct {
// The ports, portRange, and allPorts fields are mutually exclusive.
// Only packets addressed to ports in the specified range will be forwarded
// to the backends configured with this forwarding rule.
// The allPorts field has the following limitations:
// +kubebuilder:validation:Optional
AllPorts *bool `json:"allPorts,omitempty" tf:"all_ports,omitempty"`
// This field is used along with the backend_service field for
// internal load balancing or with the target field for internal
// TargetInstance.
// If the field is set to TRUE, clients can access ILB from all
// regions.
// Otherwise only allows access from clients in the same region as the
// internal load balancer.
// +kubebuilder:validation:Optional
AllowGlobalAccess *bool `json:"allowGlobalAccess,omitempty" tf:"allow_global_access,omitempty"`
// This is used in PSC consumer ForwardingRule to control whether the PSC endpoint can be accessed from another region.
// +kubebuilder:validation:Optional
AllowPscGlobalAccess *bool `json:"allowPscGlobalAccess,omitempty" tf:"allow_psc_global_access,omitempty"`
// Identifies the backend service to which the forwarding rule sends traffic.
// Required for Internal TCP/UDP Load Balancing and Network Load Balancing;
// must be omitted for all other load balancer types.
// +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/compute/v1beta1.RegionBackendService
// +crossplane:generate:reference:extractor=github.com/upbound/provider-gcp/config/common.SelfLinkExtractor()
// +kubebuilder:validation:Optional
BackendService *string `json:"backendService,omitempty" tf:"backend_service,omitempty"`
// Reference to a RegionBackendService in compute to populate backendService.
// +kubebuilder:validation:Optional
BackendServiceRef *v1.Reference `json:"backendServiceRef,omitempty" tf:"-"`
// Selector for a RegionBackendService in compute to populate backendService.
// +kubebuilder:validation:Optional
BackendServiceSelector *v1.Selector `json:"backendServiceSelector,omitempty" tf:"-"`
// An optional description of this resource. Provide this property when
// you create the resource.
// +kubebuilder:validation:Optional
Description *string `json:"description,omitempty" tf:"description,omitempty"`
// IP address for which this forwarding rule accepts traffic. When a client
// sends traffic to this IP address, the forwarding rule directs the traffic
// to the referenced target or backendService.
// While creating a forwarding rule, specifying an IPAddress is
// required under the following circumstances:
// +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/compute/v1beta1.Address
// +crossplane:generate:reference:extractor=github.com/upbound/provider-gcp/config/common.SelfLinkExtractor()
// +kubebuilder:validation:Optional
IPAddress *string `json:"ipAddress,omitempty" tf:"ip_address,omitempty"`
// Reference to a Address in compute to populate ipAddress.
// +kubebuilder:validation:Optional
IPAddressRef *v1.Reference `json:"ipAddressRef,omitempty" tf:"-"`
// Selector for a Address in compute to populate ipAddress.
// +kubebuilder:validation:Optional
IPAddressSelector *v1.Selector `json:"ipAddressSelector,omitempty" tf:"-"`
// The IP protocol to which this rule applies.
// For protocol forwarding, valid
// options are TCP, UDP, ESP,
// AH, SCTP, ICMP and
// L3_DEFAULT.
// The valid IP protocols are different for different load balancing products
// as described in Load balancing
// features.
// A Forwarding Rule with protocol L3_DEFAULT can attach with target instance or
// backend service with UNSPECIFIED protocol.
// A forwarding rule with "L3_DEFAULT" IPProtocal cannot be attached to a backend service with TCP or UDP.
// Possible values are: TCP, UDP, ESP, AH, SCTP, ICMP, L3_DEFAULT.
// +kubebuilder:validation:Optional
IPProtocol *string `json:"ipProtocol,omitempty" tf:"ip_protocol,omitempty"`
// The IP address version that will be used by this forwarding rule.
// Valid options are IPV4 and IPV6.
// If not set, the IPv4 address will be used by default.
// Possible values are: IPV4, IPV6.
// +kubebuilder:validation:Optional
IPVersion *string `json:"ipVersion,omitempty" tf:"ip_version,omitempty"`
// Indicates whether or not this load balancer can be used as a collector for
// packet mirroring. To prevent mirroring loops, instances behind this
// load balancer will not have their traffic mirrored even if a
// PacketMirroring rule applies to them.
// This can only be set to true for load balancers that have their
// loadBalancingScheme set to INTERNAL.
// +kubebuilder:validation:Optional
IsMirroringCollector *bool `json:"isMirroringCollector,omitempty" tf:"is_mirroring_collector,omitempty"`
// Labels to apply to this forwarding rule. A list of key->value pairs.
// +kubebuilder:validation:Optional
// +mapType=granular
Labels map[string]*string `json:"labels,omitempty" tf:"labels,omitempty"`
// Specifies the forwarding rule type.
// For more information about forwarding rules, refer to
// Forwarding rule concepts.
// Default value is EXTERNAL.
// Possible values are: EXTERNAL, EXTERNAL_MANAGED, INTERNAL, INTERNAL_MANAGED.
// +kubebuilder:validation:Optional
LoadBalancingScheme *string `json:"loadBalancingScheme,omitempty" tf:"load_balancing_scheme,omitempty"`
// This field is not used for external load balancing.
// For Internal TCP/UDP Load Balancing, this field identifies the network that
// the load balanced IP should belong to for this Forwarding Rule.
// If the subnetwork is specified, the network of the subnetwork will be used.
// If neither subnetwork nor this field is specified, the default network will
// be used.
// For Private Service Connect forwarding rules that forward traffic to Google
// APIs, a network must be provided.
// +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/compute/v1beta1.Network
// +crossplane:generate:reference:extractor=github.com/upbound/provider-gcp/config/common.SelfLinkExtractor()
// +kubebuilder:validation:Optional
Network *string `json:"network,omitempty" tf:"network,omitempty"`
// Reference to a Network in compute to populate network.
// +kubebuilder:validation:Optional
NetworkRef *v1.Reference `json:"networkRef,omitempty" tf:"-"`
// Selector for a Network in compute to populate network.
// +kubebuilder:validation:Optional
NetworkSelector *v1.Selector `json:"networkSelector,omitempty" tf:"-"`
// This signifies the networking tier used for configuring
// this load balancer and can only take the following values:
// PREMIUM, STANDARD.
// For regional ForwardingRule, the valid values are PREMIUM and
// STANDARD. For GlobalForwardingRule, the valid value is
// PREMIUM.
// If this field is not specified, it is assumed to be PREMIUM.
// If IPAddress is specified, this value must be equal to the
// networkTier of the Address.
// Possible values are: PREMIUM, STANDARD.
// +kubebuilder:validation:Optional
NetworkTier *string `json:"networkTier,omitempty" tf:"network_tier,omitempty"`
// This is used in PSC consumer ForwardingRule to control whether it should try to auto-generate a DNS zone or not. Non-PSC forwarding rules do not use this field.
// +kubebuilder:validation:Optional
NoAutomateDNSZone *bool `json:"noAutomateDnsZone,omitempty" tf:"no_automate_dns_zone,omitempty"`
// The ports, portRange, and allPorts fields are mutually exclusive.
// Only packets addressed to ports in the specified range will be forwarded
// to the backends configured with this forwarding rule.
// The portRange field has the following limitations:
// +kubebuilder:validation:Optional
PortRange *string `json:"portRange,omitempty" tf:"port_range,omitempty"`
// The ports, portRange, and allPorts fields are mutually exclusive.
// Only packets addressed to ports in the specified range will be forwarded
// to the backends configured with this forwarding rule.
// The ports field has the following limitations:
// +kubebuilder:validation:Optional
// +listType=set
Ports []*string `json:"ports,omitempty" tf:"ports,omitempty"`
// The ID of the project in which the resource belongs.
// If it is not provided, the provider project is used.
// +kubebuilder:validation:Optional
Project *string `json:"project,omitempty" tf:"project,omitempty"`
// this is used in psc consumer forwardingrule to make provider recreate the forwardingrule when the status is closed
// +kubebuilder:validation:Optional
RecreateClosedPsc *bool `json:"recreateClosedPsc,omitempty" tf:"recreate_closed_psc,omitempty"`
// A reference to the region where the regional forwarding rule resides.
// This field is not applicable to global forwarding rules.
// +kubebuilder:validation:Required
Region *string `json:"region" tf:"region,omitempty"`
// Service Directory resources to register this forwarding rule with.
// Currently, only supports a single Service Directory resource.
// Structure is documented below.
// +kubebuilder:validation:Optional
ServiceDirectoryRegistrations []ServiceDirectoryRegistrationsParameters `json:"serviceDirectoryRegistrations,omitempty" tf:"service_directory_registrations,omitempty"`
// An optional prefix to the service name for this Forwarding Rule.
// If specified, will be the first label of the fully qualified service
// name.
// The label must be 1-63 characters long, and comply with RFC1035.
// Specifically, the label 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.
// This field is only used for INTERNAL load balancing.
// +kubebuilder:validation:Optional
ServiceLabel *string `json:"serviceLabel,omitempty" tf:"service_label,omitempty"`
// If not empty, this Forwarding Rule will only forward the traffic when the source IP address matches one of the IP addresses or CIDR ranges set here. Note that a Forwarding Rule can only have up to 64 source IP ranges, and this field can only be used with a regional Forwarding Rule whose scheme is EXTERNAL. Each sourceIpRange entry should be either an IP address (for example, 1.2.3.4) or a CIDR range (for example, 1.2.3.0/24).
// +kubebuilder:validation:Optional
SourceIPRanges []*string `json:"sourceIpRanges,omitempty" tf:"source_ip_ranges,omitempty"`
// This field identifies the subnetwork that the load balanced IP should
// belong to for this Forwarding Rule, used in internal load balancing and
// network load balancing with IPv6.
// If the network specified is in auto subnet mode, this field is optional.
// However, a subnetwork must be specified if the network is in custom subnet
// mode or when creating external forwarding rule with IPv6.
// +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/compute/v1beta1.Subnetwork
// +crossplane:generate:reference:extractor=github.com/upbound/provider-gcp/config/common.SelfLinkExtractor()
// +kubebuilder:validation:Optional
Subnetwork *string `json:"subnetwork,omitempty" tf:"subnetwork,omitempty"`
// Reference to a Subnetwork in compute to populate subnetwork.
// +kubebuilder:validation:Optional
SubnetworkRef *v1.Reference `json:"subnetworkRef,omitempty" tf:"-"`
// Selector for a Subnetwork in compute to populate subnetwork.
// +kubebuilder:validation:Optional
SubnetworkSelector *v1.Selector `json:"subnetworkSelector,omitempty" tf:"-"`
// is set to targetGrpcProxy and
// validateForProxyless is set to true, the
// IPAddress should be set to 0.0.0.0.
// +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/compute/v1beta1.RegionTargetHTTPProxy
// +crossplane:generate:reference:extractor=github.com/upbound/provider-gcp/config/common.SelfLinkExtractor()
// +kubebuilder:validation:Optional
Target *string `json:"target,omitempty" tf:"target,omitempty"`
// Reference to a RegionTargetHTTPProxy in compute to populate target.
// +kubebuilder:validation:Optional
TargetRef *v1.Reference `json:"targetRef,omitempty" tf:"-"`
// Selector for a RegionTargetHTTPProxy in compute to populate target.
// +kubebuilder:validation:Optional
TargetSelector *v1.Selector `json:"targetSelector,omitempty" tf:"-"`
}
type ServiceDirectoryRegistrationsInitParameters struct {
// Service Directory namespace to register the forwarding rule under.
Namespace *string `json:"namespace,omitempty" tf:"namespace,omitempty"`
// Service Directory service to register the forwarding rule under.
Service *string `json:"service,omitempty" tf:"service,omitempty"`
}
type ServiceDirectoryRegistrationsObservation struct {
// Service Directory namespace to register the forwarding rule under.
Namespace *string `json:"namespace,omitempty" tf:"namespace,omitempty"`
// Service Directory service to register the forwarding rule under.
Service *string `json:"service,omitempty" tf:"service,omitempty"`
}
type ServiceDirectoryRegistrationsParameters struct {
// Service Directory namespace to register the forwarding rule under.
// +kubebuilder:validation:Optional
Namespace *string `json:"namespace,omitempty" tf:"namespace,omitempty"`
// Service Directory service to register the forwarding rule under.
// +kubebuilder:validation:Optional
Service *string `json:"service,omitempty" tf:"service,omitempty"`
}
// ForwardingRuleSpec defines the desired state of ForwardingRule
type ForwardingRuleSpec struct {
v1.ResourceSpec `json:",inline"`
ForProvider ForwardingRuleParameters `json:"forProvider"`
// THIS IS A BETA FIELD. It will be honored
// unless the Management Policies feature flag is disabled.
// InitProvider holds the same fields as ForProvider, with the exception
// of Identifier and other resource reference fields. The fields that are
// in InitProvider are merged into ForProvider when the resource is created.
// The same fields are also added to the terraform ignore_changes hook, to
// avoid updating them after creation. This is useful for fields that are
// required on creation, but we do not desire to update them after creation,
// for example because of an external controller is managing them, like an
// autoscaler.
InitProvider ForwardingRuleInitParameters `json:"initProvider,omitempty"`
}
// ForwardingRuleStatus defines the observed state of ForwardingRule.
type ForwardingRuleStatus struct {
v1.ResourceStatus `json:",inline"`
AtProvider ForwardingRuleObservation `json:"atProvider,omitempty"`
}
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:storageversion
// ForwardingRule is the Schema for the ForwardingRules API. A ForwardingRule resource.
// +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status"
// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status"
// +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name"
// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp"
// +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,gcp}
type ForwardingRule struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ForwardingRuleSpec `json:"spec"`
Status ForwardingRuleStatus `json:"status,omitempty"`
}
// +kubebuilder:object:root=true
// ForwardingRuleList contains a list of ForwardingRules
type ForwardingRuleList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []ForwardingRule `json:"items"`
}
// Repository type metadata.
var (
ForwardingRule_Kind = "ForwardingRule"
ForwardingRule_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: ForwardingRule_Kind}.String()
ForwardingRule_KindAPIVersion = ForwardingRule_Kind + "." + CRDGroupVersion.String()
ForwardingRule_GroupVersionKind = CRDGroupVersion.WithKind(ForwardingRule_Kind)
)
func init() {
SchemeBuilder.Register(&ForwardingRule{}, &ForwardingRuleList{})
}