-
Notifications
You must be signed in to change notification settings - Fork 68
/
zz_securitypolicy_types.go
executable file
·795 lines (585 loc) · 37 KB
/
zz_securitypolicy_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
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
// 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 AdaptiveProtectionConfigInitParameters struct {
// Configuration for Google Cloud Armor Adaptive Protection Layer 7 DDoS Defense. Structure is documented below.
Layer7DdosDefenseConfig []Layer7DdosDefenseConfigInitParameters `json:"layer7DdosDefenseConfig,omitempty" tf:"layer_7_ddos_defense_config,omitempty"`
}
type AdaptiveProtectionConfigObservation struct {
// Configuration for Google Cloud Armor Adaptive Protection Layer 7 DDoS Defense. Structure is documented below.
Layer7DdosDefenseConfig []Layer7DdosDefenseConfigObservation `json:"layer7DdosDefenseConfig,omitempty" tf:"layer_7_ddos_defense_config,omitempty"`
}
type AdaptiveProtectionConfigParameters struct {
// Configuration for Google Cloud Armor Adaptive Protection Layer 7 DDoS Defense. Structure is documented below.
// +kubebuilder:validation:Optional
Layer7DdosDefenseConfig []Layer7DdosDefenseConfigParameters `json:"layer7DdosDefenseConfig,omitempty" tf:"layer_7_ddos_defense_config,omitempty"`
}
type AdvancedOptionsConfigInitParameters struct {
// Custom configuration to apply the JSON parsing. Only applicable when
// json_parsing is set to STANDARD. Structure is documented below.
JSONCustomConfig []JSONCustomConfigInitParameters `json:"jsonCustomConfig,omitempty" tf:"json_custom_config,omitempty"`
// Whether or not to JSON parse the payload body. Defaults to DISABLED.
JSONParsing *string `json:"jsonParsing,omitempty" tf:"json_parsing,omitempty"`
// Log level to use. Defaults to NORMAL.
LogLevel *string `json:"logLevel,omitempty" tf:"log_level,omitempty"`
// An optional list of case-insensitive request header names to use for resolving the callers client IP address.
// +listType=set
UserIPRequestHeaders []*string `json:"userIpRequestHeaders,omitempty" tf:"user_ip_request_headers,omitempty"`
}
type AdvancedOptionsConfigObservation struct {
// Custom configuration to apply the JSON parsing. Only applicable when
// json_parsing is set to STANDARD. Structure is documented below.
JSONCustomConfig []JSONCustomConfigObservation `json:"jsonCustomConfig,omitempty" tf:"json_custom_config,omitempty"`
// Whether or not to JSON parse the payload body. Defaults to DISABLED.
JSONParsing *string `json:"jsonParsing,omitempty" tf:"json_parsing,omitempty"`
// Log level to use. Defaults to NORMAL.
LogLevel *string `json:"logLevel,omitempty" tf:"log_level,omitempty"`
// An optional list of case-insensitive request header names to use for resolving the callers client IP address.
// +listType=set
UserIPRequestHeaders []*string `json:"userIpRequestHeaders,omitempty" tf:"user_ip_request_headers,omitempty"`
}
type AdvancedOptionsConfigParameters struct {
// Custom configuration to apply the JSON parsing. Only applicable when
// json_parsing is set to STANDARD. Structure is documented below.
// +kubebuilder:validation:Optional
JSONCustomConfig []JSONCustomConfigParameters `json:"jsonCustomConfig,omitempty" tf:"json_custom_config,omitempty"`
// Whether or not to JSON parse the payload body. Defaults to DISABLED.
// +kubebuilder:validation:Optional
JSONParsing *string `json:"jsonParsing,omitempty" tf:"json_parsing,omitempty"`
// Log level to use. Defaults to NORMAL.
// +kubebuilder:validation:Optional
LogLevel *string `json:"logLevel,omitempty" tf:"log_level,omitempty"`
// An optional list of case-insensitive request header names to use for resolving the callers client IP address.
// +kubebuilder:validation:Optional
// +listType=set
UserIPRequestHeaders []*string `json:"userIpRequestHeaders,omitempty" tf:"user_ip_request_headers,omitempty"`
}
type BanThresholdInitParameters struct {
// Number of HTTP(S) requests for calculating the threshold.
Count *float64 `json:"count,omitempty" tf:"count,omitempty"`
// Interval over which the threshold is computed.
IntervalSec *float64 `json:"intervalSec,omitempty" tf:"interval_sec,omitempty"`
}
type BanThresholdObservation struct {
// Number of HTTP(S) requests for calculating the threshold.
Count *float64 `json:"count,omitempty" tf:"count,omitempty"`
// Interval over which the threshold is computed.
IntervalSec *float64 `json:"intervalSec,omitempty" tf:"interval_sec,omitempty"`
}
type BanThresholdParameters struct {
// Number of HTTP(S) requests for calculating the threshold.
// +kubebuilder:validation:Optional
Count *float64 `json:"count" tf:"count,omitempty"`
// Interval over which the threshold is computed.
// +kubebuilder:validation:Optional
IntervalSec *float64 `json:"intervalSec" tf:"interval_sec,omitempty"`
}
type ConfigInitParameters struct {
// Set of IP addresses or ranges (IPV4 or IPV6) in CIDR notation
// to match against inbound traffic. There is a limit of 10 IP ranges per rule. A value of * matches all IPs
// (can be used to override the default behavior).
// +listType=set
SrcIPRanges []*string `json:"srcIpRanges,omitempty" tf:"src_ip_ranges,omitempty"`
}
type ConfigObservation struct {
// Set of IP addresses or ranges (IPV4 or IPV6) in CIDR notation
// to match against inbound traffic. There is a limit of 10 IP ranges per rule. A value of * matches all IPs
// (can be used to override the default behavior).
// +listType=set
SrcIPRanges []*string `json:"srcIpRanges,omitempty" tf:"src_ip_ranges,omitempty"`
}
type ConfigParameters struct {
// Set of IP addresses or ranges (IPV4 or IPV6) in CIDR notation
// to match against inbound traffic. There is a limit of 10 IP ranges per rule. A value of * matches all IPs
// (can be used to override the default behavior).
// +kubebuilder:validation:Optional
// +listType=set
SrcIPRanges []*string `json:"srcIpRanges" tf:"src_ip_ranges,omitempty"`
}
type ExceedRedirectOptionsInitParameters struct {
// Target for the redirect action. This is required if the type is EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
Target *string `json:"target,omitempty" tf:"target,omitempty"`
// Type of the redirect action.
Type *string `json:"type,omitempty" tf:"type,omitempty"`
}
type ExceedRedirectOptionsObservation struct {
// Target for the redirect action. This is required if the type is EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
Target *string `json:"target,omitempty" tf:"target,omitempty"`
// Type of the redirect action.
Type *string `json:"type,omitempty" tf:"type,omitempty"`
}
type ExceedRedirectOptionsParameters struct {
// Target for the redirect action. This is required if the type is EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
// +kubebuilder:validation:Optional
Target *string `json:"target,omitempty" tf:"target,omitempty"`
// Type of the redirect action.
// +kubebuilder:validation:Optional
Type *string `json:"type" tf:"type,omitempty"`
}
type ExprInitParameters struct {
// Textual representation of an expression in Common Expression Language syntax.
// The application context of the containing message determines which well-known feature set of CEL is supported.
Expression *string `json:"expression,omitempty" tf:"expression,omitempty"`
}
type ExprObservation struct {
// Textual representation of an expression in Common Expression Language syntax.
// The application context of the containing message determines which well-known feature set of CEL is supported.
Expression *string `json:"expression,omitempty" tf:"expression,omitempty"`
}
type ExprParameters struct {
// Textual representation of an expression in Common Expression Language syntax.
// The application context of the containing message determines which well-known feature set of CEL is supported.
// +kubebuilder:validation:Optional
Expression *string `json:"expression" tf:"expression,omitempty"`
}
type JSONCustomConfigInitParameters struct {
// A list of custom Content-Type header values to apply the JSON parsing. The
// format of the Content-Type header values is defined in
// RFC 1341. When configuring a custom Content-Type header
// value, only the type/subtype needs to be specified, and the parameters should be excluded.
// +listType=set
ContentTypes []*string `json:"contentTypes,omitempty" tf:"content_types,omitempty"`
}
type JSONCustomConfigObservation struct {
// A list of custom Content-Type header values to apply the JSON parsing. The
// format of the Content-Type header values is defined in
// RFC 1341. When configuring a custom Content-Type header
// value, only the type/subtype needs to be specified, and the parameters should be excluded.
// +listType=set
ContentTypes []*string `json:"contentTypes,omitempty" tf:"content_types,omitempty"`
}
type JSONCustomConfigParameters struct {
// A list of custom Content-Type header values to apply the JSON parsing. The
// format of the Content-Type header values is defined in
// RFC 1341. When configuring a custom Content-Type header
// value, only the type/subtype needs to be specified, and the parameters should be excluded.
// +kubebuilder:validation:Optional
// +listType=set
ContentTypes []*string `json:"contentTypes" tf:"content_types,omitempty"`
}
type Layer7DdosDefenseConfigInitParameters struct {
// If set to true, enables CAAP for L7 DDoS detection.
Enable *bool `json:"enable,omitempty" tf:"enable,omitempty"`
// Rule visibility can be one of the following:
RuleVisibility *string `json:"ruleVisibility,omitempty" tf:"rule_visibility,omitempty"`
}
type Layer7DdosDefenseConfigObservation struct {
// If set to true, enables CAAP for L7 DDoS detection.
Enable *bool `json:"enable,omitempty" tf:"enable,omitempty"`
// Rule visibility can be one of the following:
RuleVisibility *string `json:"ruleVisibility,omitempty" tf:"rule_visibility,omitempty"`
}
type Layer7DdosDefenseConfigParameters struct {
// If set to true, enables CAAP for L7 DDoS detection.
// +kubebuilder:validation:Optional
Enable *bool `json:"enable,omitempty" tf:"enable,omitempty"`
// Rule visibility can be one of the following:
// +kubebuilder:validation:Optional
RuleVisibility *string `json:"ruleVisibility,omitempty" tf:"rule_visibility,omitempty"`
}
type RateLimitOptionsInitParameters struct {
// Can only be specified if the action for the rule is rate_based_ban.
// If specified, determines the time (in seconds) the traffic will continue to be banned by the rate limit after the rate falls below the threshold.
BanDurationSec *float64 `json:"banDurationSec,omitempty" tf:"ban_duration_sec,omitempty"`
// Can only be specified if the action for the rule is rate_based_ban.
// If specified, the key will be banned for the configured ban_duration_sec when the number of requests that exceed the rate_limit_threshold also
// exceed this ban_threshold. Structure is documented below.
BanThreshold []BanThresholdInitParameters `json:"banThreshold,omitempty" tf:"ban_threshold,omitempty"`
// Action to take for requests that are under the configured rate limit threshold. Valid option is allow only.
ConformAction *string `json:"conformAction,omitempty" tf:"conform_action,omitempty"`
// Determines the key to enforce the rate_limit_threshold on. If not specified, defaults to ALL.
EnforceOnKey *string `json:"enforceOnKey,omitempty" tf:"enforce_on_key,omitempty"`
// Rate limit key name applicable only for the following key types:
EnforceOnKeyName *string `json:"enforceOnKeyName,omitempty" tf:"enforce_on_key_name,omitempty"`
// When a request is denied, returns the HTTP response code specified.
// Valid options are deny() where valid values for status are 403, 404, 429, and 502.
ExceedAction *string `json:"exceedAction,omitempty" tf:"exceed_action,omitempty"`
// block supports:
ExceedRedirectOptions []ExceedRedirectOptionsInitParameters `json:"exceedRedirectOptions,omitempty" tf:"exceed_redirect_options,omitempty"`
// Threshold at which to begin ratelimiting. Structure is documented below.
RateLimitThreshold []RateLimitThresholdInitParameters `json:"rateLimitThreshold,omitempty" tf:"rate_limit_threshold,omitempty"`
}
type RateLimitOptionsObservation struct {
// Can only be specified if the action for the rule is rate_based_ban.
// If specified, determines the time (in seconds) the traffic will continue to be banned by the rate limit after the rate falls below the threshold.
BanDurationSec *float64 `json:"banDurationSec,omitempty" tf:"ban_duration_sec,omitempty"`
// Can only be specified if the action for the rule is rate_based_ban.
// If specified, the key will be banned for the configured ban_duration_sec when the number of requests that exceed the rate_limit_threshold also
// exceed this ban_threshold. Structure is documented below.
BanThreshold []BanThresholdObservation `json:"banThreshold,omitempty" tf:"ban_threshold,omitempty"`
// Action to take for requests that are under the configured rate limit threshold. Valid option is allow only.
ConformAction *string `json:"conformAction,omitempty" tf:"conform_action,omitempty"`
// Determines the key to enforce the rate_limit_threshold on. If not specified, defaults to ALL.
EnforceOnKey *string `json:"enforceOnKey,omitempty" tf:"enforce_on_key,omitempty"`
// Rate limit key name applicable only for the following key types:
EnforceOnKeyName *string `json:"enforceOnKeyName,omitempty" tf:"enforce_on_key_name,omitempty"`
// When a request is denied, returns the HTTP response code specified.
// Valid options are deny() where valid values for status are 403, 404, 429, and 502.
ExceedAction *string `json:"exceedAction,omitempty" tf:"exceed_action,omitempty"`
// block supports:
ExceedRedirectOptions []ExceedRedirectOptionsObservation `json:"exceedRedirectOptions,omitempty" tf:"exceed_redirect_options,omitempty"`
// Threshold at which to begin ratelimiting. Structure is documented below.
RateLimitThreshold []RateLimitThresholdObservation `json:"rateLimitThreshold,omitempty" tf:"rate_limit_threshold,omitempty"`
}
type RateLimitOptionsParameters struct {
// Can only be specified if the action for the rule is rate_based_ban.
// If specified, determines the time (in seconds) the traffic will continue to be banned by the rate limit after the rate falls below the threshold.
// +kubebuilder:validation:Optional
BanDurationSec *float64 `json:"banDurationSec,omitempty" tf:"ban_duration_sec,omitempty"`
// Can only be specified if the action for the rule is rate_based_ban.
// If specified, the key will be banned for the configured ban_duration_sec when the number of requests that exceed the rate_limit_threshold also
// exceed this ban_threshold. Structure is documented below.
// +kubebuilder:validation:Optional
BanThreshold []BanThresholdParameters `json:"banThreshold,omitempty" tf:"ban_threshold,omitempty"`
// Action to take for requests that are under the configured rate limit threshold. Valid option is allow only.
// +kubebuilder:validation:Optional
ConformAction *string `json:"conformAction" tf:"conform_action,omitempty"`
// Determines the key to enforce the rate_limit_threshold on. If not specified, defaults to ALL.
// +kubebuilder:validation:Optional
EnforceOnKey *string `json:"enforceOnKey,omitempty" tf:"enforce_on_key,omitempty"`
// Rate limit key name applicable only for the following key types:
// +kubebuilder:validation:Optional
EnforceOnKeyName *string `json:"enforceOnKeyName,omitempty" tf:"enforce_on_key_name,omitempty"`
// When a request is denied, returns the HTTP response code specified.
// Valid options are deny() where valid values for status are 403, 404, 429, and 502.
// +kubebuilder:validation:Optional
ExceedAction *string `json:"exceedAction" tf:"exceed_action,omitempty"`
// block supports:
// +kubebuilder:validation:Optional
ExceedRedirectOptions []ExceedRedirectOptionsParameters `json:"exceedRedirectOptions,omitempty" tf:"exceed_redirect_options,omitempty"`
// Threshold at which to begin ratelimiting. Structure is documented below.
// +kubebuilder:validation:Optional
RateLimitThreshold []RateLimitThresholdParameters `json:"rateLimitThreshold" tf:"rate_limit_threshold,omitempty"`
}
type RateLimitThresholdInitParameters struct {
// Number of HTTP(S) requests for calculating the threshold.
Count *float64 `json:"count,omitempty" tf:"count,omitempty"`
// Interval over which the threshold is computed.
IntervalSec *float64 `json:"intervalSec,omitempty" tf:"interval_sec,omitempty"`
}
type RateLimitThresholdObservation struct {
// Number of HTTP(S) requests for calculating the threshold.
Count *float64 `json:"count,omitempty" tf:"count,omitempty"`
// Interval over which the threshold is computed.
IntervalSec *float64 `json:"intervalSec,omitempty" tf:"interval_sec,omitempty"`
}
type RateLimitThresholdParameters struct {
// Number of HTTP(S) requests for calculating the threshold.
// +kubebuilder:validation:Optional
Count *float64 `json:"count" tf:"count,omitempty"`
// Interval over which the threshold is computed.
// +kubebuilder:validation:Optional
IntervalSec *float64 `json:"intervalSec" tf:"interval_sec,omitempty"`
}
type RecaptchaOptionsConfigInitParameters struct {
// A field to supply a reCAPTCHA site key to be used for all the rules using the redirect action with the type of GOOGLE_RECAPTCHA under the security policy. The specified site key needs to be created from the reCAPTCHA API. The user is responsible for the validity of the specified site key. If not specified, a Google-managed site key is used.
RedirectSiteKey *string `json:"redirectSiteKey,omitempty" tf:"redirect_site_key,omitempty"`
}
type RecaptchaOptionsConfigObservation struct {
// A field to supply a reCAPTCHA site key to be used for all the rules using the redirect action with the type of GOOGLE_RECAPTCHA under the security policy. The specified site key needs to be created from the reCAPTCHA API. The user is responsible for the validity of the specified site key. If not specified, a Google-managed site key is used.
RedirectSiteKey *string `json:"redirectSiteKey,omitempty" tf:"redirect_site_key,omitempty"`
}
type RecaptchaOptionsConfigParameters struct {
// A field to supply a reCAPTCHA site key to be used for all the rules using the redirect action with the type of GOOGLE_RECAPTCHA under the security policy. The specified site key needs to be created from the reCAPTCHA API. The user is responsible for the validity of the specified site key. If not specified, a Google-managed site key is used.
// +kubebuilder:validation:Optional
RedirectSiteKey *string `json:"redirectSiteKey" tf:"redirect_site_key,omitempty"`
}
type RedirectOptionsInitParameters struct {
// Target for the redirect action. This is required if the type is EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
Target *string `json:"target,omitempty" tf:"target,omitempty"`
// Type of the redirect action.
Type *string `json:"type,omitempty" tf:"type,omitempty"`
}
type RedirectOptionsObservation struct {
// Target for the redirect action. This is required if the type is EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
Target *string `json:"target,omitempty" tf:"target,omitempty"`
// Type of the redirect action.
Type *string `json:"type,omitempty" tf:"type,omitempty"`
}
type RedirectOptionsParameters struct {
// Target for the redirect action. This is required if the type is EXTERNAL_302 and cannot be specified for GOOGLE_RECAPTCHA.
// +kubebuilder:validation:Optional
Target *string `json:"target,omitempty" tf:"target,omitempty"`
// Type of the redirect action.
// +kubebuilder:validation:Optional
Type *string `json:"type" tf:"type,omitempty"`
}
type RequestHeadersToAddsInitParameters struct {
// The name of the header to set.
HeaderName *string `json:"headerName,omitempty" tf:"header_name,omitempty"`
// The value to set the named header to.
HeaderValue *string `json:"headerValue,omitempty" tf:"header_value,omitempty"`
}
type RequestHeadersToAddsObservation struct {
// The name of the header to set.
HeaderName *string `json:"headerName,omitempty" tf:"header_name,omitempty"`
// The value to set the named header to.
HeaderValue *string `json:"headerValue,omitempty" tf:"header_value,omitempty"`
}
type RequestHeadersToAddsParameters struct {
// The name of the header to set.
// +kubebuilder:validation:Optional
HeaderName *string `json:"headerName" tf:"header_name,omitempty"`
// The value to set the named header to.
// +kubebuilder:validation:Optional
HeaderValue *string `json:"headerValue,omitempty" tf:"header_value,omitempty"`
}
type RuleHeaderActionInitParameters struct {
// The list of request headers to add or overwrite if they're already present. Structure is documented below.
RequestHeadersToAdds []RequestHeadersToAddsInitParameters `json:"requestHeadersToAdds,omitempty" tf:"request_headers_to_adds,omitempty"`
}
type RuleHeaderActionObservation struct {
// The list of request headers to add or overwrite if they're already present. Structure is documented below.
RequestHeadersToAdds []RequestHeadersToAddsObservation `json:"requestHeadersToAdds,omitempty" tf:"request_headers_to_adds,omitempty"`
}
type RuleHeaderActionParameters struct {
// The list of request headers to add or overwrite if they're already present. Structure is documented below.
// +kubebuilder:validation:Optional
RequestHeadersToAdds []RequestHeadersToAddsParameters `json:"requestHeadersToAdds" tf:"request_headers_to_adds,omitempty"`
}
type RuleInitParameters struct {
// Action to take when match matches the request. Valid values:
Action *string `json:"action,omitempty" tf:"action,omitempty"`
// An optional description of this rule. Max size is 64.
Description *string `json:"description,omitempty" tf:"description,omitempty"`
// Additional actions that are performed on headers. Structure is documented below.
HeaderAction []RuleHeaderActionInitParameters `json:"headerAction,omitempty" tf:"header_action,omitempty"`
// A match condition that incoming traffic is evaluated against.
// If it evaluates to true, the corresponding action is enforced. Structure is documented below.
Match []RuleMatchInitParameters `json:"match,omitempty" tf:"match,omitempty"`
// When set to true, the action specified above is not enforced.
// Stackdriver logs for requests that trigger a preview action are annotated as such.
Preview *bool `json:"preview,omitempty" tf:"preview,omitempty"`
// An unique positive integer indicating the priority of evaluation for a rule.
// Rules are evaluated from highest priority (lowest numerically) to lowest priority (highest numerically) in order.
Priority *float64 `json:"priority,omitempty" tf:"priority,omitempty"`
// Must be specified if the action is rate_based_ban or throttle. Cannot be specified for other actions. Structure is documented below.
RateLimitOptions []RateLimitOptionsInitParameters `json:"rateLimitOptions,omitempty" tf:"rate_limit_options,omitempty"`
// Can be specified if the action is redirect. Cannot be specified for other actions. Structure is documented below.
RedirectOptions []RedirectOptionsInitParameters `json:"redirectOptions,omitempty" tf:"redirect_options,omitempty"`
}
type RuleMatchInitParameters struct {
// The configuration options available when specifying versioned_expr.
// This field must be specified if versioned_expr is specified and cannot be specified if versioned_expr is not specified.
// Structure is documented below.
Config []ConfigInitParameters `json:"config,omitempty" tf:"config,omitempty"`
// User defined CEVAL expression. A CEVAL expression is used to specify match criteria
// such as origin.ip, source.region_code and contents in the request header.
// Structure is documented below.
Expr []ExprInitParameters `json:"expr,omitempty" tf:"expr,omitempty"`
// Predefined rule expression. If this field is specified, config must also be specified.
// Available options:
VersionedExpr *string `json:"versionedExpr,omitempty" tf:"versioned_expr,omitempty"`
}
type RuleMatchObservation struct {
// The configuration options available when specifying versioned_expr.
// This field must be specified if versioned_expr is specified and cannot be specified if versioned_expr is not specified.
// Structure is documented below.
Config []ConfigObservation `json:"config,omitempty" tf:"config,omitempty"`
// User defined CEVAL expression. A CEVAL expression is used to specify match criteria
// such as origin.ip, source.region_code and contents in the request header.
// Structure is documented below.
Expr []ExprObservation `json:"expr,omitempty" tf:"expr,omitempty"`
// Predefined rule expression. If this field is specified, config must also be specified.
// Available options:
VersionedExpr *string `json:"versionedExpr,omitempty" tf:"versioned_expr,omitempty"`
}
type RuleMatchParameters struct {
// The configuration options available when specifying versioned_expr.
// This field must be specified if versioned_expr is specified and cannot be specified if versioned_expr is not specified.
// Structure is documented below.
// +kubebuilder:validation:Optional
Config []ConfigParameters `json:"config,omitempty" tf:"config,omitempty"`
// User defined CEVAL expression. A CEVAL expression is used to specify match criteria
// such as origin.ip, source.region_code and contents in the request header.
// Structure is documented below.
// +kubebuilder:validation:Optional
Expr []ExprParameters `json:"expr,omitempty" tf:"expr,omitempty"`
// Predefined rule expression. If this field is specified, config must also be specified.
// Available options:
// +kubebuilder:validation:Optional
VersionedExpr *string `json:"versionedExpr,omitempty" tf:"versioned_expr,omitempty"`
}
type RuleObservation struct {
// Action to take when match matches the request. Valid values:
Action *string `json:"action,omitempty" tf:"action,omitempty"`
// An optional description of this rule. Max size is 64.
Description *string `json:"description,omitempty" tf:"description,omitempty"`
// Additional actions that are performed on headers. Structure is documented below.
HeaderAction []RuleHeaderActionObservation `json:"headerAction,omitempty" tf:"header_action,omitempty"`
// A match condition that incoming traffic is evaluated against.
// If it evaluates to true, the corresponding action is enforced. Structure is documented below.
Match []RuleMatchObservation `json:"match,omitempty" tf:"match,omitempty"`
// When set to true, the action specified above is not enforced.
// Stackdriver logs for requests that trigger a preview action are annotated as such.
Preview *bool `json:"preview,omitempty" tf:"preview,omitempty"`
// An unique positive integer indicating the priority of evaluation for a rule.
// Rules are evaluated from highest priority (lowest numerically) to lowest priority (highest numerically) in order.
Priority *float64 `json:"priority,omitempty" tf:"priority,omitempty"`
// Must be specified if the action is rate_based_ban or throttle. Cannot be specified for other actions. Structure is documented below.
RateLimitOptions []RateLimitOptionsObservation `json:"rateLimitOptions,omitempty" tf:"rate_limit_options,omitempty"`
// Can be specified if the action is redirect. Cannot be specified for other actions. Structure is documented below.
RedirectOptions []RedirectOptionsObservation `json:"redirectOptions,omitempty" tf:"redirect_options,omitempty"`
}
type RuleParameters struct {
// Action to take when match matches the request. Valid values:
// +kubebuilder:validation:Optional
Action *string `json:"action" tf:"action,omitempty"`
// An optional description of this rule. Max size is 64.
// +kubebuilder:validation:Optional
Description *string `json:"description,omitempty" tf:"description,omitempty"`
// Additional actions that are performed on headers. Structure is documented below.
// +kubebuilder:validation:Optional
HeaderAction []RuleHeaderActionParameters `json:"headerAction,omitempty" tf:"header_action,omitempty"`
// A match condition that incoming traffic is evaluated against.
// If it evaluates to true, the corresponding action is enforced. Structure is documented below.
// +kubebuilder:validation:Optional
Match []RuleMatchParameters `json:"match" tf:"match,omitempty"`
// When set to true, the action specified above is not enforced.
// Stackdriver logs for requests that trigger a preview action are annotated as such.
// +kubebuilder:validation:Optional
Preview *bool `json:"preview,omitempty" tf:"preview,omitempty"`
// An unique positive integer indicating the priority of evaluation for a rule.
// Rules are evaluated from highest priority (lowest numerically) to lowest priority (highest numerically) in order.
// +kubebuilder:validation:Optional
Priority *float64 `json:"priority" tf:"priority,omitempty"`
// Must be specified if the action is rate_based_ban or throttle. Cannot be specified for other actions. Structure is documented below.
// +kubebuilder:validation:Optional
RateLimitOptions []RateLimitOptionsParameters `json:"rateLimitOptions,omitempty" tf:"rate_limit_options,omitempty"`
// Can be specified if the action is redirect. Cannot be specified for other actions. Structure is documented below.
// +kubebuilder:validation:Optional
RedirectOptions []RedirectOptionsParameters `json:"redirectOptions,omitempty" tf:"redirect_options,omitempty"`
}
type SecurityPolicyInitParameters struct {
// Configuration for Google Cloud Armor Adaptive Protection. Structure is documented below.
AdaptiveProtectionConfig []AdaptiveProtectionConfigInitParameters `json:"adaptiveProtectionConfig,omitempty" tf:"adaptive_protection_config,omitempty"`
// Advanced Configuration Options.
// Structure is documented below.
AdvancedOptionsConfig []AdvancedOptionsConfigInitParameters `json:"advancedOptionsConfig,omitempty" tf:"advanced_options_config,omitempty"`
// An optional description of this security policy. Max size is 2048.
Description *string `json:"description,omitempty" tf:"description,omitempty"`
// 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"`
// reCAPTCHA Configuration Options. Structure is documented below.
RecaptchaOptionsConfig []RecaptchaOptionsConfigInitParameters `json:"recaptchaOptionsConfig,omitempty" tf:"recaptcha_options_config,omitempty"`
// The set of rules that belong to this policy. There must always be a default
// rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a
// security policy, a default rule with action "allow" will be added. Structure is documented below.
Rule []RuleInitParameters `json:"rule,omitempty" tf:"rule,omitempty"`
// The type indicates the intended use of the security policy. This field can be set only at resource creation time.
Type *string `json:"type,omitempty" tf:"type,omitempty"`
}
type SecurityPolicyObservation struct {
// Configuration for Google Cloud Armor Adaptive Protection. Structure is documented below.
AdaptiveProtectionConfig []AdaptiveProtectionConfigObservation `json:"adaptiveProtectionConfig,omitempty" tf:"adaptive_protection_config,omitempty"`
// Advanced Configuration Options.
// Structure is documented below.
AdvancedOptionsConfig []AdvancedOptionsConfigObservation `json:"advancedOptionsConfig,omitempty" tf:"advanced_options_config,omitempty"`
// An optional description of this security policy. Max size is 2048.
Description *string `json:"description,omitempty" tf:"description,omitempty"`
// Fingerprint of this resource.
Fingerprint *string `json:"fingerprint,omitempty" tf:"fingerprint,omitempty"`
// an identifier for the resource with format projects/{{project}}/global/securityPolicies/{{name}}
ID *string `json:"id,omitempty" tf:"id,omitempty"`
// 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"`
// reCAPTCHA Configuration Options. Structure is documented below.
RecaptchaOptionsConfig []RecaptchaOptionsConfigObservation `json:"recaptchaOptionsConfig,omitempty" tf:"recaptcha_options_config,omitempty"`
// The set of rules that belong to this policy. There must always be a default
// rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a
// security policy, a default rule with action "allow" will be added. Structure is documented below.
Rule []RuleObservation `json:"rule,omitempty" tf:"rule,omitempty"`
// The URI of the created resource.
SelfLink *string `json:"selfLink,omitempty" tf:"self_link,omitempty"`
// The type indicates the intended use of the security policy. This field can be set only at resource creation time.
Type *string `json:"type,omitempty" tf:"type,omitempty"`
}
type SecurityPolicyParameters struct {
// Configuration for Google Cloud Armor Adaptive Protection. Structure is documented below.
// +kubebuilder:validation:Optional
AdaptiveProtectionConfig []AdaptiveProtectionConfigParameters `json:"adaptiveProtectionConfig,omitempty" tf:"adaptive_protection_config,omitempty"`
// Advanced Configuration Options.
// Structure is documented below.
// +kubebuilder:validation:Optional
AdvancedOptionsConfig []AdvancedOptionsConfigParameters `json:"advancedOptionsConfig,omitempty" tf:"advanced_options_config,omitempty"`
// An optional description of this security policy. Max size is 2048.
// +kubebuilder:validation:Optional
Description *string `json:"description,omitempty" tf:"description,omitempty"`
// 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"`
// reCAPTCHA Configuration Options. Structure is documented below.
// +kubebuilder:validation:Optional
RecaptchaOptionsConfig []RecaptchaOptionsConfigParameters `json:"recaptchaOptionsConfig,omitempty" tf:"recaptcha_options_config,omitempty"`
// The set of rules that belong to this policy. There must always be a default
// rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a
// security policy, a default rule with action "allow" will be added. Structure is documented below.
// +kubebuilder:validation:Optional
Rule []RuleParameters `json:"rule,omitempty" tf:"rule,omitempty"`
// The type indicates the intended use of the security policy. This field can be set only at resource creation time.
// +kubebuilder:validation:Optional
Type *string `json:"type,omitempty" tf:"type,omitempty"`
}
// SecurityPolicySpec defines the desired state of SecurityPolicy
type SecurityPolicySpec struct {
v1.ResourceSpec `json:",inline"`
ForProvider SecurityPolicyParameters `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 SecurityPolicyInitParameters `json:"initProvider,omitempty"`
}
// SecurityPolicyStatus defines the observed state of SecurityPolicy.
type SecurityPolicyStatus struct {
v1.ResourceStatus `json:",inline"`
AtProvider SecurityPolicyObservation `json:"atProvider,omitempty"`
}
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:storageversion
// SecurityPolicy is the Schema for the SecurityPolicys API. Creates a Security Policy resource for Google Compute Engine.
// +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 SecurityPolicy struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec SecurityPolicySpec `json:"spec"`
Status SecurityPolicyStatus `json:"status,omitempty"`
}
// +kubebuilder:object:root=true
// SecurityPolicyList contains a list of SecurityPolicys
type SecurityPolicyList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []SecurityPolicy `json:"items"`
}
// Repository type metadata.
var (
SecurityPolicy_Kind = "SecurityPolicy"
SecurityPolicy_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: SecurityPolicy_Kind}.String()
SecurityPolicy_KindAPIVersion = SecurityPolicy_Kind + "." + CRDGroupVersion.String()
SecurityPolicy_GroupVersionKind = CRDGroupVersion.WithKind(SecurityPolicy_Kind)
)
func init() {
SchemeBuilder.Register(&SecurityPolicy{}, &SecurityPolicyList{})
}