-
Notifications
You must be signed in to change notification settings - Fork 64
/
zz_routernat_types.go
executable file
·613 lines (491 loc) · 29.2 KB
/
zz_routernat_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
// 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 ActionInitParameters struct {
// A list of URLs of the IP resources used for this NAT rule.
// These IP addresses must be valid static external IP addresses assigned to the project.
// This field is used for public NAT.
// +listType=set
SourceNATActiveIps []*string `json:"sourceNatActiveIps,omitempty" tf:"source_nat_active_ips,omitempty"`
// A list of URLs of the IP resources to be drained.
// These IPs must be valid static external IPs that have been assigned to the NAT.
// These IPs should be used for updating/patching a NAT rule only.
// This field is used for public NAT.
// +listType=set
SourceNATDrainIps []*string `json:"sourceNatDrainIps,omitempty" tf:"source_nat_drain_ips,omitempty"`
}
type ActionObservation struct {
// A list of URLs of the IP resources used for this NAT rule.
// These IP addresses must be valid static external IP addresses assigned to the project.
// This field is used for public NAT.
// +listType=set
SourceNATActiveIps []*string `json:"sourceNatActiveIps,omitempty" tf:"source_nat_active_ips,omitempty"`
// A list of URLs of the IP resources to be drained.
// These IPs must be valid static external IPs that have been assigned to the NAT.
// These IPs should be used for updating/patching a NAT rule only.
// This field is used for public NAT.
// +listType=set
SourceNATDrainIps []*string `json:"sourceNatDrainIps,omitempty" tf:"source_nat_drain_ips,omitempty"`
}
type ActionParameters struct {
// A list of URLs of the IP resources used for this NAT rule.
// These IP addresses must be valid static external IP addresses assigned to the project.
// This field is used for public NAT.
// +kubebuilder:validation:Optional
// +listType=set
SourceNATActiveIps []*string `json:"sourceNatActiveIps,omitempty" tf:"source_nat_active_ips,omitempty"`
// A list of URLs of the IP resources to be drained.
// These IPs must be valid static external IPs that have been assigned to the NAT.
// These IPs should be used for updating/patching a NAT rule only.
// This field is used for public NAT.
// +kubebuilder:validation:Optional
// +listType=set
SourceNATDrainIps []*string `json:"sourceNatDrainIps,omitempty" tf:"source_nat_drain_ips,omitempty"`
}
type RouterNATInitParameters struct {
// A list of URLs of the IP resources to be drained. These IPs must be
// valid static external IPs that have been assigned to the NAT.
// +listType=set
DrainNATIps []*string `json:"drainNatIps,omitempty" tf:"drain_nat_ips,omitempty"`
// Enable Dynamic Port Allocation.
// If minPortsPerVm is set, minPortsPerVm must be set to a power of two greater than or equal to 32.
// If minPortsPerVm is not set, a minimum of 32 ports will be allocated to a VM from this NAT config.
// If maxPortsPerVm is set, maxPortsPerVm must be set to a power of two greater than minPortsPerVm.
// If maxPortsPerVm is not set, a maximum of 65536 ports will be allocated to a VM from this NAT config.
// Mutually exclusive with enableEndpointIndependentMapping.
EnableDynamicPortAllocation *bool `json:"enableDynamicPortAllocation,omitempty" tf:"enable_dynamic_port_allocation,omitempty"`
// Enable endpoint independent mapping.
// For more information see the official documentation.
EnableEndpointIndependentMapping *bool `json:"enableEndpointIndependentMapping,omitempty" tf:"enable_endpoint_independent_mapping,omitempty"`
// Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
IcmpIdleTimeoutSec *float64 `json:"icmpIdleTimeoutSec,omitempty" tf:"icmp_idle_timeout_sec,omitempty"`
// Configuration for logging on NAT
// Structure is documented below.
LogConfig []RouterNATLogConfigInitParameters `json:"logConfig,omitempty" tf:"log_config,omitempty"`
// Maximum number of ports allocated to a VM from this NAT.
// This field can only be set when enableDynamicPortAllocation is enabled.
MaxPortsPerVM *float64 `json:"maxPortsPerVm,omitempty" tf:"max_ports_per_vm,omitempty"`
// Minimum number of ports allocated to a VM from this NAT. Defaults to 64 for static port allocation and 32 dynamic port allocation if not set.
MinPortsPerVM *float64 `json:"minPortsPerVm,omitempty" tf:"min_ports_per_vm,omitempty"`
// How external IPs should be allocated for this NAT. Valid values are
// AUTO_ONLY for only allowing NAT IPs allocated by Google Cloud
// Platform, or MANUAL_ONLY for only user-allocated NAT IP addresses.
// Possible values are: MANUAL_ONLY, AUTO_ONLY.
NATIPAllocateOption *string `json:"natIpAllocateOption,omitempty" tf:"nat_ip_allocate_option,omitempty"`
// Self-links of NAT IPs. Only valid if natIpAllocateOption
// is set to MANUAL_ONLY.
// +listType=set
NATIps []*string `json:"natIps,omitempty" tf:"nat_ips,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"`
// A list of rules associated with this NAT.
// Structure is documented below.
Rules []RulesInitParameters `json:"rules,omitempty" tf:"rules,omitempty"`
// How NAT should be configured per Subnetwork.
// If ALL_SUBNETWORKS_ALL_IP_RANGES, all of the
// IP ranges in every Subnetwork are allowed to Nat.
// If ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, all of the primary IP
// ranges in every Subnetwork are allowed to Nat.
// LIST_OF_SUBNETWORKS: A list of Subnetworks are allowed to Nat
// (specified in the field subnetwork below). Note that if this field
// contains ALL_SUBNETWORKS_ALL_IP_RANGES or
// ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, then there should not be any
// other RouterNat section in any Router for this network in this region.
// Possible values are: ALL_SUBNETWORKS_ALL_IP_RANGES, ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, LIST_OF_SUBNETWORKS.
SourceSubnetworkIPRangesToNAT *string `json:"sourceSubnetworkIpRangesToNat,omitempty" tf:"source_subnetwork_ip_ranges_to_nat,omitempty"`
// One or more subnetwork NAT configurations. Only used if
// source_subnetwork_ip_ranges_to_nat is set to LIST_OF_SUBNETWORKS
// Structure is documented below.
Subnetwork []SubnetworkInitParameters `json:"subnetwork,omitempty" tf:"subnetwork,omitempty"`
// Timeout (in seconds) for TCP established connections.
// Defaults to 1200s if not set.
TCPEstablishedIdleTimeoutSec *float64 `json:"tcpEstablishedIdleTimeoutSec,omitempty" tf:"tcp_established_idle_timeout_sec,omitempty"`
// Timeout (in seconds) for TCP connections that are in TIME_WAIT state.
// Defaults to 120s if not set.
TCPTimeWaitTimeoutSec *float64 `json:"tcpTimeWaitTimeoutSec,omitempty" tf:"tcp_time_wait_timeout_sec,omitempty"`
// Timeout (in seconds) for TCP transitory connections.
// Defaults to 30s if not set.
TCPTransitoryIdleTimeoutSec *float64 `json:"tcpTransitoryIdleTimeoutSec,omitempty" tf:"tcp_transitory_idle_timeout_sec,omitempty"`
// Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
UDPIdleTimeoutSec *float64 `json:"udpIdleTimeoutSec,omitempty" tf:"udp_idle_timeout_sec,omitempty"`
}
type RouterNATLogConfigInitParameters struct {
// Indicates whether or not to export logs.
Enable *bool `json:"enable,omitempty" tf:"enable,omitempty"`
// Specifies the desired filtering of logs on this NAT.
// Possible values are: ERRORS_ONLY, TRANSLATIONS_ONLY, ALL.
Filter *string `json:"filter,omitempty" tf:"filter,omitempty"`
}
type RouterNATLogConfigObservation struct {
// Indicates whether or not to export logs.
Enable *bool `json:"enable,omitempty" tf:"enable,omitempty"`
// Specifies the desired filtering of logs on this NAT.
// Possible values are: ERRORS_ONLY, TRANSLATIONS_ONLY, ALL.
Filter *string `json:"filter,omitempty" tf:"filter,omitempty"`
}
type RouterNATLogConfigParameters struct {
// Indicates whether or not to export logs.
// +kubebuilder:validation:Optional
Enable *bool `json:"enable" tf:"enable,omitempty"`
// Specifies the desired filtering of logs on this NAT.
// Possible values are: ERRORS_ONLY, TRANSLATIONS_ONLY, ALL.
// +kubebuilder:validation:Optional
Filter *string `json:"filter" tf:"filter,omitempty"`
}
type RouterNATObservation struct {
// A list of URLs of the IP resources to be drained. These IPs must be
// valid static external IPs that have been assigned to the NAT.
// +listType=set
DrainNATIps []*string `json:"drainNatIps,omitempty" tf:"drain_nat_ips,omitempty"`
// Enable Dynamic Port Allocation.
// If minPortsPerVm is set, minPortsPerVm must be set to a power of two greater than or equal to 32.
// If minPortsPerVm is not set, a minimum of 32 ports will be allocated to a VM from this NAT config.
// If maxPortsPerVm is set, maxPortsPerVm must be set to a power of two greater than minPortsPerVm.
// If maxPortsPerVm is not set, a maximum of 65536 ports will be allocated to a VM from this NAT config.
// Mutually exclusive with enableEndpointIndependentMapping.
EnableDynamicPortAllocation *bool `json:"enableDynamicPortAllocation,omitempty" tf:"enable_dynamic_port_allocation,omitempty"`
// Enable endpoint independent mapping.
// For more information see the official documentation.
EnableEndpointIndependentMapping *bool `json:"enableEndpointIndependentMapping,omitempty" tf:"enable_endpoint_independent_mapping,omitempty"`
// an identifier for the resource with format {{project}}/{{region}}/{{router}}/{{name}}
ID *string `json:"id,omitempty" tf:"id,omitempty"`
// Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
IcmpIdleTimeoutSec *float64 `json:"icmpIdleTimeoutSec,omitempty" tf:"icmp_idle_timeout_sec,omitempty"`
// Configuration for logging on NAT
// Structure is documented below.
LogConfig []RouterNATLogConfigObservation `json:"logConfig,omitempty" tf:"log_config,omitempty"`
// Maximum number of ports allocated to a VM from this NAT.
// This field can only be set when enableDynamicPortAllocation is enabled.
MaxPortsPerVM *float64 `json:"maxPortsPerVm,omitempty" tf:"max_ports_per_vm,omitempty"`
// Minimum number of ports allocated to a VM from this NAT. Defaults to 64 for static port allocation and 32 dynamic port allocation if not set.
MinPortsPerVM *float64 `json:"minPortsPerVm,omitempty" tf:"min_ports_per_vm,omitempty"`
// How external IPs should be allocated for this NAT. Valid values are
// AUTO_ONLY for only allowing NAT IPs allocated by Google Cloud
// Platform, or MANUAL_ONLY for only user-allocated NAT IP addresses.
// Possible values are: MANUAL_ONLY, AUTO_ONLY.
NATIPAllocateOption *string `json:"natIpAllocateOption,omitempty" tf:"nat_ip_allocate_option,omitempty"`
// Self-links of NAT IPs. Only valid if natIpAllocateOption
// is set to MANUAL_ONLY.
// +listType=set
NATIps []*string `json:"natIps,omitempty" tf:"nat_ips,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"`
// Region where the router and NAT reside.
Region *string `json:"region,omitempty" tf:"region,omitempty"`
// The name of the Cloud Router in which this NAT will be configured.
Router *string `json:"router,omitempty" tf:"router,omitempty"`
// A list of rules associated with this NAT.
// Structure is documented below.
Rules []RulesObservation `json:"rules,omitempty" tf:"rules,omitempty"`
// How NAT should be configured per Subnetwork.
// If ALL_SUBNETWORKS_ALL_IP_RANGES, all of the
// IP ranges in every Subnetwork are allowed to Nat.
// If ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, all of the primary IP
// ranges in every Subnetwork are allowed to Nat.
// LIST_OF_SUBNETWORKS: A list of Subnetworks are allowed to Nat
// (specified in the field subnetwork below). Note that if this field
// contains ALL_SUBNETWORKS_ALL_IP_RANGES or
// ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, then there should not be any
// other RouterNat section in any Router for this network in this region.
// Possible values are: ALL_SUBNETWORKS_ALL_IP_RANGES, ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, LIST_OF_SUBNETWORKS.
SourceSubnetworkIPRangesToNAT *string `json:"sourceSubnetworkIpRangesToNat,omitempty" tf:"source_subnetwork_ip_ranges_to_nat,omitempty"`
// One or more subnetwork NAT configurations. Only used if
// source_subnetwork_ip_ranges_to_nat is set to LIST_OF_SUBNETWORKS
// Structure is documented below.
Subnetwork []SubnetworkObservation `json:"subnetwork,omitempty" tf:"subnetwork,omitempty"`
// Timeout (in seconds) for TCP established connections.
// Defaults to 1200s if not set.
TCPEstablishedIdleTimeoutSec *float64 `json:"tcpEstablishedIdleTimeoutSec,omitempty" tf:"tcp_established_idle_timeout_sec,omitempty"`
// Timeout (in seconds) for TCP connections that are in TIME_WAIT state.
// Defaults to 120s if not set.
TCPTimeWaitTimeoutSec *float64 `json:"tcpTimeWaitTimeoutSec,omitempty" tf:"tcp_time_wait_timeout_sec,omitempty"`
// Timeout (in seconds) for TCP transitory connections.
// Defaults to 30s if not set.
TCPTransitoryIdleTimeoutSec *float64 `json:"tcpTransitoryIdleTimeoutSec,omitempty" tf:"tcp_transitory_idle_timeout_sec,omitempty"`
// Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
UDPIdleTimeoutSec *float64 `json:"udpIdleTimeoutSec,omitempty" tf:"udp_idle_timeout_sec,omitempty"`
}
type RouterNATParameters struct {
// A list of URLs of the IP resources to be drained. These IPs must be
// valid static external IPs that have been assigned to the NAT.
// +kubebuilder:validation:Optional
// +listType=set
DrainNATIps []*string `json:"drainNatIps,omitempty" tf:"drain_nat_ips,omitempty"`
// Enable Dynamic Port Allocation.
// If minPortsPerVm is set, minPortsPerVm must be set to a power of two greater than or equal to 32.
// If minPortsPerVm is not set, a minimum of 32 ports will be allocated to a VM from this NAT config.
// If maxPortsPerVm is set, maxPortsPerVm must be set to a power of two greater than minPortsPerVm.
// If maxPortsPerVm is not set, a maximum of 65536 ports will be allocated to a VM from this NAT config.
// Mutually exclusive with enableEndpointIndependentMapping.
// +kubebuilder:validation:Optional
EnableDynamicPortAllocation *bool `json:"enableDynamicPortAllocation,omitempty" tf:"enable_dynamic_port_allocation,omitempty"`
// Enable endpoint independent mapping.
// For more information see the official documentation.
// +kubebuilder:validation:Optional
EnableEndpointIndependentMapping *bool `json:"enableEndpointIndependentMapping,omitempty" tf:"enable_endpoint_independent_mapping,omitempty"`
// Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
// +kubebuilder:validation:Optional
IcmpIdleTimeoutSec *float64 `json:"icmpIdleTimeoutSec,omitempty" tf:"icmp_idle_timeout_sec,omitempty"`
// Configuration for logging on NAT
// Structure is documented below.
// +kubebuilder:validation:Optional
LogConfig []RouterNATLogConfigParameters `json:"logConfig,omitempty" tf:"log_config,omitempty"`
// Maximum number of ports allocated to a VM from this NAT.
// This field can only be set when enableDynamicPortAllocation is enabled.
// +kubebuilder:validation:Optional
MaxPortsPerVM *float64 `json:"maxPortsPerVm,omitempty" tf:"max_ports_per_vm,omitempty"`
// Minimum number of ports allocated to a VM from this NAT. Defaults to 64 for static port allocation and 32 dynamic port allocation if not set.
// +kubebuilder:validation:Optional
MinPortsPerVM *float64 `json:"minPortsPerVm,omitempty" tf:"min_ports_per_vm,omitempty"`
// How external IPs should be allocated for this NAT. Valid values are
// AUTO_ONLY for only allowing NAT IPs allocated by Google Cloud
// Platform, or MANUAL_ONLY for only user-allocated NAT IP addresses.
// Possible values are: MANUAL_ONLY, AUTO_ONLY.
// +kubebuilder:validation:Optional
NATIPAllocateOption *string `json:"natIpAllocateOption,omitempty" tf:"nat_ip_allocate_option,omitempty"`
// Self-links of NAT IPs. Only valid if natIpAllocateOption
// is set to MANUAL_ONLY.
// +kubebuilder:validation:Optional
// +listType=set
NATIps []*string `json:"natIps,omitempty" tf:"nat_ips,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"`
// Region where the router and NAT reside.
// +kubebuilder:validation:Required
Region *string `json:"region" tf:"region,omitempty"`
// The name of the Cloud Router in which this NAT will be configured.
// +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/compute/v1beta1.Router
// +kubebuilder:validation:Optional
Router *string `json:"router,omitempty" tf:"router,omitempty"`
// Reference to a Router in compute to populate router.
// +kubebuilder:validation:Optional
RouterRef *v1.Reference `json:"routerRef,omitempty" tf:"-"`
// Selector for a Router in compute to populate router.
// +kubebuilder:validation:Optional
RouterSelector *v1.Selector `json:"routerSelector,omitempty" tf:"-"`
// A list of rules associated with this NAT.
// Structure is documented below.
// +kubebuilder:validation:Optional
Rules []RulesParameters `json:"rules,omitempty" tf:"rules,omitempty"`
// How NAT should be configured per Subnetwork.
// If ALL_SUBNETWORKS_ALL_IP_RANGES, all of the
// IP ranges in every Subnetwork are allowed to Nat.
// If ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, all of the primary IP
// ranges in every Subnetwork are allowed to Nat.
// LIST_OF_SUBNETWORKS: A list of Subnetworks are allowed to Nat
// (specified in the field subnetwork below). Note that if this field
// contains ALL_SUBNETWORKS_ALL_IP_RANGES or
// ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, then there should not be any
// other RouterNat section in any Router for this network in this region.
// Possible values are: ALL_SUBNETWORKS_ALL_IP_RANGES, ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, LIST_OF_SUBNETWORKS.
// +kubebuilder:validation:Optional
SourceSubnetworkIPRangesToNAT *string `json:"sourceSubnetworkIpRangesToNat,omitempty" tf:"source_subnetwork_ip_ranges_to_nat,omitempty"`
// One or more subnetwork NAT configurations. Only used if
// source_subnetwork_ip_ranges_to_nat is set to LIST_OF_SUBNETWORKS
// Structure is documented below.
// +kubebuilder:validation:Optional
Subnetwork []SubnetworkParameters `json:"subnetwork,omitempty" tf:"subnetwork,omitempty"`
// Timeout (in seconds) for TCP established connections.
// Defaults to 1200s if not set.
// +kubebuilder:validation:Optional
TCPEstablishedIdleTimeoutSec *float64 `json:"tcpEstablishedIdleTimeoutSec,omitempty" tf:"tcp_established_idle_timeout_sec,omitempty"`
// Timeout (in seconds) for TCP connections that are in TIME_WAIT state.
// Defaults to 120s if not set.
// +kubebuilder:validation:Optional
TCPTimeWaitTimeoutSec *float64 `json:"tcpTimeWaitTimeoutSec,omitempty" tf:"tcp_time_wait_timeout_sec,omitempty"`
// Timeout (in seconds) for TCP transitory connections.
// Defaults to 30s if not set.
// +kubebuilder:validation:Optional
TCPTransitoryIdleTimeoutSec *float64 `json:"tcpTransitoryIdleTimeoutSec,omitempty" tf:"tcp_transitory_idle_timeout_sec,omitempty"`
// Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
// +kubebuilder:validation:Optional
UDPIdleTimeoutSec *float64 `json:"udpIdleTimeoutSec,omitempty" tf:"udp_idle_timeout_sec,omitempty"`
}
type RulesInitParameters struct {
// The action to be enforced for traffic that matches this rule.
// Structure is documented below.
Action []ActionInitParameters `json:"action,omitempty" tf:"action,omitempty"`
// An optional description of this rule.
Description *string `json:"description,omitempty" tf:"description,omitempty"`
// CEL expression that specifies the match condition that egress traffic from a VM is evaluated against.
// If it evaluates to true, the corresponding action is enforced.
// The following examples are valid match expressions for public NAT:
// "inIpRange(destination.ip, '1.1.0.0/16') || inIpRange(destination.ip, '2.2.0.0/16')"
// "destination.ip == '1.1.0.1' || destination.ip == '8.8.8.8'"
// The following example is a valid match expression for private NAT:
// "nexthop.hub == 'https://networkconnectivity.googleapis.com/v1alpha1/projects/my-project/global/hub/hub-1'"
Match *string `json:"match,omitempty" tf:"match,omitempty"`
// An integer uniquely identifying a rule in the list.
// The rule number must be a positive value between 0 and 65000, and must be unique among rules within a NAT.
RuleNumber *float64 `json:"ruleNumber,omitempty" tf:"rule_number,omitempty"`
}
type RulesObservation struct {
// The action to be enforced for traffic that matches this rule.
// Structure is documented below.
Action []ActionObservation `json:"action,omitempty" tf:"action,omitempty"`
// An optional description of this rule.
Description *string `json:"description,omitempty" tf:"description,omitempty"`
// CEL expression that specifies the match condition that egress traffic from a VM is evaluated against.
// If it evaluates to true, the corresponding action is enforced.
// The following examples are valid match expressions for public NAT:
// "inIpRange(destination.ip, '1.1.0.0/16') || inIpRange(destination.ip, '2.2.0.0/16')"
// "destination.ip == '1.1.0.1' || destination.ip == '8.8.8.8'"
// The following example is a valid match expression for private NAT:
// "nexthop.hub == 'https://networkconnectivity.googleapis.com/v1alpha1/projects/my-project/global/hub/hub-1'"
Match *string `json:"match,omitempty" tf:"match,omitempty"`
// An integer uniquely identifying a rule in the list.
// The rule number must be a positive value between 0 and 65000, and must be unique among rules within a NAT.
RuleNumber *float64 `json:"ruleNumber,omitempty" tf:"rule_number,omitempty"`
}
type RulesParameters struct {
// The action to be enforced for traffic that matches this rule.
// Structure is documented below.
// +kubebuilder:validation:Optional
Action []ActionParameters `json:"action,omitempty" tf:"action,omitempty"`
// An optional description of this rule.
// +kubebuilder:validation:Optional
Description *string `json:"description,omitempty" tf:"description,omitempty"`
// CEL expression that specifies the match condition that egress traffic from a VM is evaluated against.
// If it evaluates to true, the corresponding action is enforced.
// The following examples are valid match expressions for public NAT:
// "inIpRange(destination.ip, '1.1.0.0/16') || inIpRange(destination.ip, '2.2.0.0/16')"
// "destination.ip == '1.1.0.1' || destination.ip == '8.8.8.8'"
// The following example is a valid match expression for private NAT:
// "nexthop.hub == 'https://networkconnectivity.googleapis.com/v1alpha1/projects/my-project/global/hub/hub-1'"
// +kubebuilder:validation:Optional
Match *string `json:"match" tf:"match,omitempty"`
// An integer uniquely identifying a rule in the list.
// The rule number must be a positive value between 0 and 65000, and must be unique among rules within a NAT.
// +kubebuilder:validation:Optional
RuleNumber *float64 `json:"ruleNumber" tf:"rule_number,omitempty"`
}
type SubnetworkInitParameters struct {
// Self-link of subnetwork to NAT
// +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/compute/v1beta1.Subnetwork
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// Reference to a Subnetwork in compute to populate name.
// +kubebuilder:validation:Optional
NameRef *v1.Reference `json:"nameRef,omitempty" tf:"-"`
// Selector for a Subnetwork in compute to populate name.
// +kubebuilder:validation:Optional
NameSelector *v1.Selector `json:"nameSelector,omitempty" tf:"-"`
// List of the secondary ranges of the subnetwork that are allowed
// to use NAT. This can be populated only if
// LIST_OF_SECONDARY_IP_RANGES is one of the values in
// sourceIpRangesToNat
// +listType=set
SecondaryIPRangeNames []*string `json:"secondaryIpRangeNames,omitempty" tf:"secondary_ip_range_names,omitempty"`
// List of options for which source IPs in the subnetwork
// should have NAT enabled. Supported values include:
// ALL_IP_RANGES, LIST_OF_SECONDARY_IP_RANGES,
// PRIMARY_IP_RANGE.
// +listType=set
SourceIPRangesToNAT []*string `json:"sourceIpRangesToNat,omitempty" tf:"source_ip_ranges_to_nat,omitempty"`
}
type SubnetworkObservation struct {
// Self-link of subnetwork to NAT
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// List of the secondary ranges of the subnetwork that are allowed
// to use NAT. This can be populated only if
// LIST_OF_SECONDARY_IP_RANGES is one of the values in
// sourceIpRangesToNat
// +listType=set
SecondaryIPRangeNames []*string `json:"secondaryIpRangeNames,omitempty" tf:"secondary_ip_range_names,omitempty"`
// List of options for which source IPs in the subnetwork
// should have NAT enabled. Supported values include:
// ALL_IP_RANGES, LIST_OF_SECONDARY_IP_RANGES,
// PRIMARY_IP_RANGE.
// +listType=set
SourceIPRangesToNAT []*string `json:"sourceIpRangesToNat,omitempty" tf:"source_ip_ranges_to_nat,omitempty"`
}
type SubnetworkParameters struct {
// Self-link of subnetwork to NAT
// +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/compute/v1beta1.Subnetwork
// +kubebuilder:validation:Optional
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// Reference to a Subnetwork in compute to populate name.
// +kubebuilder:validation:Optional
NameRef *v1.Reference `json:"nameRef,omitempty" tf:"-"`
// Selector for a Subnetwork in compute to populate name.
// +kubebuilder:validation:Optional
NameSelector *v1.Selector `json:"nameSelector,omitempty" tf:"-"`
// List of the secondary ranges of the subnetwork that are allowed
// to use NAT. This can be populated only if
// LIST_OF_SECONDARY_IP_RANGES is one of the values in
// sourceIpRangesToNat
// +kubebuilder:validation:Optional
// +listType=set
SecondaryIPRangeNames []*string `json:"secondaryIpRangeNames,omitempty" tf:"secondary_ip_range_names,omitempty"`
// List of options for which source IPs in the subnetwork
// should have NAT enabled. Supported values include:
// ALL_IP_RANGES, LIST_OF_SECONDARY_IP_RANGES,
// PRIMARY_IP_RANGE.
// +kubebuilder:validation:Optional
// +listType=set
SourceIPRangesToNAT []*string `json:"sourceIpRangesToNat" tf:"source_ip_ranges_to_nat,omitempty"`
}
// RouterNATSpec defines the desired state of RouterNAT
type RouterNATSpec struct {
v1.ResourceSpec `json:",inline"`
ForProvider RouterNATParameters `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 RouterNATInitParameters `json:"initProvider,omitempty"`
}
// RouterNATStatus defines the observed state of RouterNAT.
type RouterNATStatus struct {
v1.ResourceStatus `json:",inline"`
AtProvider RouterNATObservation `json:"atProvider,omitempty"`
}
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:storageversion
// RouterNAT is the Schema for the RouterNATs API. A NAT service created in a router.
// +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 RouterNAT struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.sourceSubnetworkIpRangesToNat) || (has(self.initProvider) && has(self.initProvider.sourceSubnetworkIpRangesToNat))",message="spec.forProvider.sourceSubnetworkIpRangesToNat is a required parameter"
Spec RouterNATSpec `json:"spec"`
Status RouterNATStatus `json:"status,omitempty"`
}
// +kubebuilder:object:root=true
// RouterNATList contains a list of RouterNATs
type RouterNATList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []RouterNAT `json:"items"`
}
// Repository type metadata.
var (
RouterNAT_Kind = "RouterNAT"
RouterNAT_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: RouterNAT_Kind}.String()
RouterNAT_KindAPIVersion = RouterNAT_Kind + "." + CRDGroupVersion.String()
RouterNAT_GroupVersionKind = CRDGroupVersion.WithKind(RouterNAT_Kind)
)
func init() {
SchemeBuilder.Register(&RouterNAT{}, &RouterNATList{})
}