generated from crossplane/upjet-provider-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
zz_mysqlcluster_types.go
executable file
·874 lines (633 loc) · 41 KB
/
zz_mysqlcluster_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
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
// Code generated by upjet. DO NOT EDIT.
package v1alpha1
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 ConnectionLimitsInitParameters struct {
// Max connections per hour.
MaxConnectionsPerHour *float64 `json:"maxConnectionsPerHour,omitempty" tf:"max_connections_per_hour,omitempty"`
// Max questions per hour.
MaxQuestionsPerHour *float64 `json:"maxQuestionsPerHour,omitempty" tf:"max_questions_per_hour,omitempty"`
// Max updates per hour.
MaxUpdatesPerHour *float64 `json:"maxUpdatesPerHour,omitempty" tf:"max_updates_per_hour,omitempty"`
// Max user connections.
MaxUserConnections *float64 `json:"maxUserConnections,omitempty" tf:"max_user_connections,omitempty"`
}
type ConnectionLimitsObservation struct {
// Max connections per hour.
MaxConnectionsPerHour *float64 `json:"maxConnectionsPerHour,omitempty" tf:"max_connections_per_hour,omitempty"`
// Max questions per hour.
MaxQuestionsPerHour *float64 `json:"maxQuestionsPerHour,omitempty" tf:"max_questions_per_hour,omitempty"`
// Max updates per hour.
MaxUpdatesPerHour *float64 `json:"maxUpdatesPerHour,omitempty" tf:"max_updates_per_hour,omitempty"`
// Max user connections.
MaxUserConnections *float64 `json:"maxUserConnections,omitempty" tf:"max_user_connections,omitempty"`
}
type ConnectionLimitsParameters struct {
// Max connections per hour.
// +kubebuilder:validation:Optional
MaxConnectionsPerHour *float64 `json:"maxConnectionsPerHour,omitempty" tf:"max_connections_per_hour,omitempty"`
// Max questions per hour.
// +kubebuilder:validation:Optional
MaxQuestionsPerHour *float64 `json:"maxQuestionsPerHour,omitempty" tf:"max_questions_per_hour,omitempty"`
// Max updates per hour.
// +kubebuilder:validation:Optional
MaxUpdatesPerHour *float64 `json:"maxUpdatesPerHour,omitempty" tf:"max_updates_per_hour,omitempty"`
// Max user connections.
// +kubebuilder:validation:Optional
MaxUserConnections *float64 `json:"maxUserConnections,omitempty" tf:"max_user_connections,omitempty"`
}
type MySQLClusterAccessInitParameters struct {
// Allow access for Yandex DataLens.
DataLens *bool `json:"dataLens,omitempty" tf:"data_lens,omitempty"`
// Allow access for DataTransfer
DataTransfer *bool `json:"dataTransfer,omitempty" tf:"data_transfer,omitempty"`
// Allows access for SQL queries in the management console.
WebSQL *bool `json:"webSql,omitempty" tf:"web_sql,omitempty"`
}
type MySQLClusterAccessObservation struct {
// Allow access for Yandex DataLens.
DataLens *bool `json:"dataLens,omitempty" tf:"data_lens,omitempty"`
// Allow access for DataTransfer
DataTransfer *bool `json:"dataTransfer,omitempty" tf:"data_transfer,omitempty"`
// Allows access for SQL queries in the management console.
WebSQL *bool `json:"webSql,omitempty" tf:"web_sql,omitempty"`
}
type MySQLClusterAccessParameters struct {
// Allow access for Yandex DataLens.
// +kubebuilder:validation:Optional
DataLens *bool `json:"dataLens,omitempty" tf:"data_lens,omitempty"`
// Allow access for DataTransfer
// +kubebuilder:validation:Optional
DataTransfer *bool `json:"dataTransfer,omitempty" tf:"data_transfer,omitempty"`
// Allows access for SQL queries in the management console.
// +kubebuilder:validation:Optional
WebSQL *bool `json:"webSql,omitempty" tf:"web_sql,omitempty"`
}
type MySQLClusterBackupWindowStartInitParameters struct {
// The hour at which backup will be started.
Hours *float64 `json:"hours,omitempty" tf:"hours,omitempty"`
// The minute at which backup will be started.
Minutes *float64 `json:"minutes,omitempty" tf:"minutes,omitempty"`
}
type MySQLClusterBackupWindowStartObservation struct {
// The hour at which backup will be started.
Hours *float64 `json:"hours,omitempty" tf:"hours,omitempty"`
// The minute at which backup will be started.
Minutes *float64 `json:"minutes,omitempty" tf:"minutes,omitempty"`
}
type MySQLClusterBackupWindowStartParameters struct {
// The hour at which backup will be started.
// +kubebuilder:validation:Optional
Hours *float64 `json:"hours,omitempty" tf:"hours,omitempty"`
// The minute at which backup will be started.
// +kubebuilder:validation:Optional
Minutes *float64 `json:"minutes,omitempty" tf:"minutes,omitempty"`
}
type MySQLClusterDatabaseInitParameters struct {
// The name of the database.
Name *string `json:"name,omitempty" tf:"name,omitempty"`
}
type MySQLClusterDatabaseObservation struct {
// The name of the database.
Name *string `json:"name,omitempty" tf:"name,omitempty"`
}
type MySQLClusterDatabaseParameters struct {
// The name of the database.
// +kubebuilder:validation:Optional
Name *string `json:"name" tf:"name,omitempty"`
}
type MySQLClusterHostInitParameters struct {
// Sets whether the host should get a public IP address. It can be changed on the fly only when name is set.
AssignPublicIP *bool `json:"assignPublicIp,omitempty" tf:"assign_public_ip,omitempty"`
// Host backup priority. Value is between 0 and 100, default is 0.
BackupPriority *float64 `json:"backupPriority,omitempty" tf:"backup_priority,omitempty"`
// Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to replication_source_name parameter.
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// Host master promotion priority. Value is between 0 and 100, default is 0.
Priority *float64 `json:"priority,omitempty" tf:"priority,omitempty"`
// Host replication source name points to host's name from which this host should replicate. When not set then host in HA group. It works only when name is set.
ReplicationSourceName *string `json:"replicationSourceName,omitempty" tf:"replication_source_name,omitempty"`
// The ID of the subnet, to which the host belongs. The subnet must be a part of the network to which the cluster belongs.
// +crossplane:generate:reference:type=github.com/tagesjump/provider-upjet-yc/apis/vpc/v1alpha1.Subnet
SubnetID *string `json:"subnetId,omitempty" tf:"subnet_id,omitempty"`
// Reference to a Subnet in vpc to populate subnetId.
// +kubebuilder:validation:Optional
SubnetIDRef *v1.Reference `json:"subnetIdRef,omitempty" tf:"-"`
// Selector for a Subnet in vpc to populate subnetId.
// +kubebuilder:validation:Optional
SubnetIDSelector *v1.Selector `json:"subnetIdSelector,omitempty" tf:"-"`
// The availability zone where the MySQL host will be created.
Zone *string `json:"zone,omitempty" tf:"zone,omitempty"`
}
type MySQLClusterHostObservation struct {
// Sets whether the host should get a public IP address. It can be changed on the fly only when name is set.
AssignPublicIP *bool `json:"assignPublicIp,omitempty" tf:"assign_public_ip,omitempty"`
// Host backup priority. Value is between 0 and 100, default is 0.
BackupPriority *float64 `json:"backupPriority,omitempty" tf:"backup_priority,omitempty"`
// (Computed) The fully qualified domain name of the host.
Fqdn *string `json:"fqdn,omitempty" tf:"fqdn,omitempty"`
// Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to replication_source_name parameter.
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// Host master promotion priority. Value is between 0 and 100, default is 0.
Priority *float64 `json:"priority,omitempty" tf:"priority,omitempty"`
// (Computed) Host replication source (fqdn), when replication_source is empty then host is in HA group.
ReplicationSource *string `json:"replicationSource,omitempty" tf:"replication_source,omitempty"`
// Host replication source name points to host's name from which this host should replicate. When not set then host in HA group. It works only when name is set.
ReplicationSourceName *string `json:"replicationSourceName,omitempty" tf:"replication_source_name,omitempty"`
// The ID of the subnet, to which the host belongs. The subnet must be a part of the network to which the cluster belongs.
SubnetID *string `json:"subnetId,omitempty" tf:"subnet_id,omitempty"`
// The availability zone where the MySQL host will be created.
Zone *string `json:"zone,omitempty" tf:"zone,omitempty"`
}
type MySQLClusterHostParameters struct {
// Sets whether the host should get a public IP address. It can be changed on the fly only when name is set.
// +kubebuilder:validation:Optional
AssignPublicIP *bool `json:"assignPublicIp,omitempty" tf:"assign_public_ip,omitempty"`
// Host backup priority. Value is between 0 and 100, default is 0.
// +kubebuilder:validation:Optional
BackupPriority *float64 `json:"backupPriority,omitempty" tf:"backup_priority,omitempty"`
// Host state name. It should be set for all hosts or unset for all hosts. This field can be used by another host, to select which host will be its replication source. Please refer to replication_source_name parameter.
// +kubebuilder:validation:Optional
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// Host master promotion priority. Value is between 0 and 100, default is 0.
// +kubebuilder:validation:Optional
Priority *float64 `json:"priority,omitempty" tf:"priority,omitempty"`
// Host replication source name points to host's name from which this host should replicate. When not set then host in HA group. It works only when name is set.
// +kubebuilder:validation:Optional
ReplicationSourceName *string `json:"replicationSourceName,omitempty" tf:"replication_source_name,omitempty"`
// The ID of the subnet, to which the host belongs. The subnet must be a part of the network to which the cluster belongs.
// +crossplane:generate:reference:type=github.com/tagesjump/provider-upjet-yc/apis/vpc/v1alpha1.Subnet
// +kubebuilder:validation:Optional
SubnetID *string `json:"subnetId,omitempty" tf:"subnet_id,omitempty"`
// Reference to a Subnet in vpc to populate subnetId.
// +kubebuilder:validation:Optional
SubnetIDRef *v1.Reference `json:"subnetIdRef,omitempty" tf:"-"`
// Selector for a Subnet in vpc to populate subnetId.
// +kubebuilder:validation:Optional
SubnetIDSelector *v1.Selector `json:"subnetIdSelector,omitempty" tf:"-"`
// The availability zone where the MySQL host will be created.
// +kubebuilder:validation:Optional
Zone *string `json:"zone" tf:"zone,omitempty"`
}
type MySQLClusterInitParameters struct {
// Access policy to the MySQL cluster. The structure is documented below.
Access []MySQLClusterAccessInitParameters `json:"access,omitempty" tf:"access,omitempty"`
// A host of the MySQL cluster. The structure is documented below.
AllowRegenerationHost *bool `json:"allowRegenerationHost,omitempty" tf:"allow_regeneration_host,omitempty"`
// The period in days during which backups are stored.
BackupRetainPeriodDays *float64 `json:"backupRetainPeriodDays,omitempty" tf:"backup_retain_period_days,omitempty"`
// Time to start the daily backup, in the UTC. The structure is documented below.
BackupWindowStart []MySQLClusterBackupWindowStartInitParameters `json:"backupWindowStart,omitempty" tf:"backup_window_start,omitempty"`
// (Deprecated) To manage databases, please switch to using a separate resource type yandex_mdb_mysql_databases.
Database []MySQLClusterDatabaseInitParameters `json:"database,omitempty" tf:"database,omitempty"`
// Inhibits deletion of the cluster. Can be either true or false.
DeletionProtection *bool `json:"deletionProtection,omitempty" tf:"deletion_protection,omitempty"`
// Description of the MySQL cluster.
Description *string `json:"description,omitempty" tf:"description,omitempty"`
// Deployment environment of the MySQL cluster.
Environment *string `json:"environment,omitempty" tf:"environment,omitempty"`
// The ID of the folder that the resource belongs to. If it
// is not provided, the default provider folder is used.
// +crossplane:generate:reference:type=github.com/tagesjump/provider-upjet-yc/apis/resourcemanager/v1alpha1.Folder
FolderID *string `json:"folderId,omitempty" tf:"folder_id,omitempty"`
// Reference to a Folder in resourcemanager to populate folderId.
// +kubebuilder:validation:Optional
FolderIDRef *v1.Reference `json:"folderIdRef,omitempty" tf:"-"`
// Selector for a Folder in resourcemanager to populate folderId.
// +kubebuilder:validation:Optional
FolderIDSelector *v1.Selector `json:"folderIdSelector,omitempty" tf:"-"`
// A host of the MySQL cluster. The structure is documented below.
Host []MySQLClusterHostInitParameters `json:"host,omitempty" tf:"host,omitempty"`
// +listType=set
HostGroupIds []*string `json:"hostGroupIds,omitempty" tf:"host_group_ids,omitempty"`
// A set of key/value label pairs to assign to the MySQL cluster.
// +mapType=granular
Labels map[string]*string `json:"labels,omitempty" tf:"labels,omitempty"`
// Maintenance policy of the MySQL cluster. The structure is documented below.
MaintenanceWindow []MySQLClusterMaintenanceWindowInitParameters `json:"maintenanceWindow,omitempty" tf:"maintenance_window,omitempty"`
// MySQL cluster config. Detail info in "MySQL config" section (documented below).
// +mapType=granular
MySQLConfig map[string]*string `json:"mysqlConfig,omitempty" tf:"mysql_config,omitempty"`
// Name of the MySQL cluster. Provided by the client when the cluster is created.
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// ID of the network, to which the MySQL cluster uses.
// +crossplane:generate:reference:type=github.com/tagesjump/provider-upjet-yc/apis/vpc/v1alpha1.Network
NetworkID *string `json:"networkId,omitempty" tf:"network_id,omitempty"`
// Reference to a Network in vpc to populate networkId.
// +kubebuilder:validation:Optional
NetworkIDRef *v1.Reference `json:"networkIdRef,omitempty" tf:"-"`
// Selector for a Network in vpc to populate networkId.
// +kubebuilder:validation:Optional
NetworkIDSelector *v1.Selector `json:"networkIdSelector,omitempty" tf:"-"`
// Cluster performance diagnostics settings. The structure is documented below. YC Documentation
PerformanceDiagnostics []MySQLClusterPerformanceDiagnosticsInitParameters `json:"performanceDiagnostics,omitempty" tf:"performance_diagnostics,omitempty"`
// Resources allocated to hosts of the MySQL cluster. The structure is documented below.
Resources []MySQLClusterResourcesInitParameters `json:"resources,omitempty" tf:"resources,omitempty"`
// The cluster will be created from the specified backup. The structure is documented below.
Restore []MySQLClusterRestoreInitParameters `json:"restore,omitempty" tf:"restore,omitempty"`
// A set of ids of security groups assigned to hosts of the cluster.
// +crossplane:generate:reference:type=github.com/tagesjump/provider-upjet-yc/apis/vpc/v1alpha1.SecurityGroup
// +listType=set
SecurityGroupIds []*string `json:"securityGroupIds,omitempty" tf:"security_group_ids,omitempty"`
// References to SecurityGroup in vpc to populate securityGroupIds.
// +kubebuilder:validation:Optional
SecurityGroupIdsRefs []v1.Reference `json:"securityGroupIdsRefs,omitempty" tf:"-"`
// Selector for a list of SecurityGroup in vpc to populate securityGroupIds.
// +kubebuilder:validation:Optional
SecurityGroupIdsSelector *v1.Selector `json:"securityGroupIdsSelector,omitempty" tf:"-"`
// (Deprecated) To manage users, please switch to using a separate resource type yandex_mdb_mysql_user.
User []MySQLClusterUserInitParameters `json:"user,omitempty" tf:"user,omitempty"`
// Version of the MySQL cluster. (allowed versions are: 5.7, 8.0)
Version *string `json:"version,omitempty" tf:"version,omitempty"`
}
type MySQLClusterMaintenanceWindowInitParameters struct {
// Day of the week (in DDD format). Allowed values: "MON", "TUE", "WED", "THU", "FRI", "SAT", "SUN"
Day *string `json:"day,omitempty" tf:"day,omitempty"`
// Hour of the day in UTC (in HH format). Allowed value is between 0 and 23.
Hour *float64 `json:"hour,omitempty" tf:"hour,omitempty"`
// Type of maintenance window. Can be either ANYTIME or WEEKLY. A day and hour of window need to be specified with weekly window.
Type *string `json:"type,omitempty" tf:"type,omitempty"`
}
type MySQLClusterMaintenanceWindowObservation struct {
// Day of the week (in DDD format). Allowed values: "MON", "TUE", "WED", "THU", "FRI", "SAT", "SUN"
Day *string `json:"day,omitempty" tf:"day,omitempty"`
// Hour of the day in UTC (in HH format). Allowed value is between 0 and 23.
Hour *float64 `json:"hour,omitempty" tf:"hour,omitempty"`
// Type of maintenance window. Can be either ANYTIME or WEEKLY. A day and hour of window need to be specified with weekly window.
Type *string `json:"type,omitempty" tf:"type,omitempty"`
}
type MySQLClusterMaintenanceWindowParameters struct {
// Day of the week (in DDD format). Allowed values: "MON", "TUE", "WED", "THU", "FRI", "SAT", "SUN"
// +kubebuilder:validation:Optional
Day *string `json:"day,omitempty" tf:"day,omitempty"`
// Hour of the day in UTC (in HH format). Allowed value is between 0 and 23.
// +kubebuilder:validation:Optional
Hour *float64 `json:"hour,omitempty" tf:"hour,omitempty"`
// Type of maintenance window. Can be either ANYTIME or WEEKLY. A day and hour of window need to be specified with weekly window.
// +kubebuilder:validation:Optional
Type *string `json:"type" tf:"type,omitempty"`
}
type MySQLClusterObservation struct {
// Access policy to the MySQL cluster. The structure is documented below.
Access []MySQLClusterAccessObservation `json:"access,omitempty" tf:"access,omitempty"`
// A host of the MySQL cluster. The structure is documented below.
AllowRegenerationHost *bool `json:"allowRegenerationHost,omitempty" tf:"allow_regeneration_host,omitempty"`
// The period in days during which backups are stored.
BackupRetainPeriodDays *float64 `json:"backupRetainPeriodDays,omitempty" tf:"backup_retain_period_days,omitempty"`
// Time to start the daily backup, in the UTC. The structure is documented below.
BackupWindowStart []MySQLClusterBackupWindowStartObservation `json:"backupWindowStart,omitempty" tf:"backup_window_start,omitempty"`
// Creation timestamp of the cluster.
CreatedAt *string `json:"createdAt,omitempty" tf:"created_at,omitempty"`
// (Deprecated) To manage databases, please switch to using a separate resource type yandex_mdb_mysql_databases.
Database []MySQLClusterDatabaseObservation `json:"database,omitempty" tf:"database,omitempty"`
// Inhibits deletion of the cluster. Can be either true or false.
DeletionProtection *bool `json:"deletionProtection,omitempty" tf:"deletion_protection,omitempty"`
// Description of the MySQL cluster.
Description *string `json:"description,omitempty" tf:"description,omitempty"`
// Deployment environment of the MySQL cluster.
Environment *string `json:"environment,omitempty" tf:"environment,omitempty"`
// The ID of the folder that the resource belongs to. If it
// is not provided, the default provider folder is used.
FolderID *string `json:"folderId,omitempty" tf:"folder_id,omitempty"`
// Aggregated health of the cluster.
Health *string `json:"health,omitempty" tf:"health,omitempty"`
// A host of the MySQL cluster. The structure is documented below.
Host []MySQLClusterHostObservation `json:"host,omitempty" tf:"host,omitempty"`
// +listType=set
HostGroupIds []*string `json:"hostGroupIds,omitempty" tf:"host_group_ids,omitempty"`
ID *string `json:"id,omitempty" tf:"id,omitempty"`
// A set of key/value label pairs to assign to the MySQL cluster.
// +mapType=granular
Labels map[string]*string `json:"labels,omitempty" tf:"labels,omitempty"`
// Maintenance policy of the MySQL cluster. The structure is documented below.
MaintenanceWindow []MySQLClusterMaintenanceWindowObservation `json:"maintenanceWindow,omitempty" tf:"maintenance_window,omitempty"`
// MySQL cluster config. Detail info in "MySQL config" section (documented below).
// +mapType=granular
MySQLConfig map[string]*string `json:"mysqlConfig,omitempty" tf:"mysql_config,omitempty"`
// Name of the MySQL cluster. Provided by the client when the cluster is created.
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// ID of the network, to which the MySQL cluster uses.
NetworkID *string `json:"networkId,omitempty" tf:"network_id,omitempty"`
// Cluster performance diagnostics settings. The structure is documented below. YC Documentation
PerformanceDiagnostics []MySQLClusterPerformanceDiagnosticsObservation `json:"performanceDiagnostics,omitempty" tf:"performance_diagnostics,omitempty"`
// Resources allocated to hosts of the MySQL cluster. The structure is documented below.
Resources []MySQLClusterResourcesObservation `json:"resources,omitempty" tf:"resources,omitempty"`
// The cluster will be created from the specified backup. The structure is documented below.
Restore []MySQLClusterRestoreObservation `json:"restore,omitempty" tf:"restore,omitempty"`
// A set of ids of security groups assigned to hosts of the cluster.
// +listType=set
SecurityGroupIds []*string `json:"securityGroupIds,omitempty" tf:"security_group_ids,omitempty"`
// Status of the cluster.
Status *string `json:"status,omitempty" tf:"status,omitempty"`
// (Deprecated) To manage users, please switch to using a separate resource type yandex_mdb_mysql_user.
User []MySQLClusterUserObservation `json:"user,omitempty" tf:"user,omitempty"`
// Version of the MySQL cluster. (allowed versions are: 5.7, 8.0)
Version *string `json:"version,omitempty" tf:"version,omitempty"`
}
type MySQLClusterParameters struct {
// Access policy to the MySQL cluster. The structure is documented below.
// +kubebuilder:validation:Optional
Access []MySQLClusterAccessParameters `json:"access,omitempty" tf:"access,omitempty"`
// A host of the MySQL cluster. The structure is documented below.
// +kubebuilder:validation:Optional
AllowRegenerationHost *bool `json:"allowRegenerationHost,omitempty" tf:"allow_regeneration_host,omitempty"`
// The period in days during which backups are stored.
// +kubebuilder:validation:Optional
BackupRetainPeriodDays *float64 `json:"backupRetainPeriodDays,omitempty" tf:"backup_retain_period_days,omitempty"`
// Time to start the daily backup, in the UTC. The structure is documented below.
// +kubebuilder:validation:Optional
BackupWindowStart []MySQLClusterBackupWindowStartParameters `json:"backupWindowStart,omitempty" tf:"backup_window_start,omitempty"`
// (Deprecated) To manage databases, please switch to using a separate resource type yandex_mdb_mysql_databases.
// +kubebuilder:validation:Optional
Database []MySQLClusterDatabaseParameters `json:"database,omitempty" tf:"database,omitempty"`
// Inhibits deletion of the cluster. Can be either true or false.
// +kubebuilder:validation:Optional
DeletionProtection *bool `json:"deletionProtection,omitempty" tf:"deletion_protection,omitempty"`
// Description of the MySQL cluster.
// +kubebuilder:validation:Optional
Description *string `json:"description,omitempty" tf:"description,omitempty"`
// Deployment environment of the MySQL cluster.
// +kubebuilder:validation:Optional
Environment *string `json:"environment,omitempty" tf:"environment,omitempty"`
// The ID of the folder that the resource belongs to. If it
// is not provided, the default provider folder is used.
// +crossplane:generate:reference:type=github.com/tagesjump/provider-upjet-yc/apis/resourcemanager/v1alpha1.Folder
// +kubebuilder:validation:Optional
FolderID *string `json:"folderId,omitempty" tf:"folder_id,omitempty"`
// Reference to a Folder in resourcemanager to populate folderId.
// +kubebuilder:validation:Optional
FolderIDRef *v1.Reference `json:"folderIdRef,omitempty" tf:"-"`
// Selector for a Folder in resourcemanager to populate folderId.
// +kubebuilder:validation:Optional
FolderIDSelector *v1.Selector `json:"folderIdSelector,omitempty" tf:"-"`
// A host of the MySQL cluster. The structure is documented below.
// +kubebuilder:validation:Optional
Host []MySQLClusterHostParameters `json:"host,omitempty" tf:"host,omitempty"`
// +kubebuilder:validation:Optional
// +listType=set
HostGroupIds []*string `json:"hostGroupIds,omitempty" tf:"host_group_ids,omitempty"`
// A set of key/value label pairs to assign to the MySQL cluster.
// +kubebuilder:validation:Optional
// +mapType=granular
Labels map[string]*string `json:"labels,omitempty" tf:"labels,omitempty"`
// Maintenance policy of the MySQL cluster. The structure is documented below.
// +kubebuilder:validation:Optional
MaintenanceWindow []MySQLClusterMaintenanceWindowParameters `json:"maintenanceWindow,omitempty" tf:"maintenance_window,omitempty"`
// MySQL cluster config. Detail info in "MySQL config" section (documented below).
// +kubebuilder:validation:Optional
// +mapType=granular
MySQLConfig map[string]*string `json:"mysqlConfig,omitempty" tf:"mysql_config,omitempty"`
// Name of the MySQL cluster. Provided by the client when the cluster is created.
// +kubebuilder:validation:Optional
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// ID of the network, to which the MySQL cluster uses.
// +crossplane:generate:reference:type=github.com/tagesjump/provider-upjet-yc/apis/vpc/v1alpha1.Network
// +kubebuilder:validation:Optional
NetworkID *string `json:"networkId,omitempty" tf:"network_id,omitempty"`
// Reference to a Network in vpc to populate networkId.
// +kubebuilder:validation:Optional
NetworkIDRef *v1.Reference `json:"networkIdRef,omitempty" tf:"-"`
// Selector for a Network in vpc to populate networkId.
// +kubebuilder:validation:Optional
NetworkIDSelector *v1.Selector `json:"networkIdSelector,omitempty" tf:"-"`
// Cluster performance diagnostics settings. The structure is documented below. YC Documentation
// +kubebuilder:validation:Optional
PerformanceDiagnostics []MySQLClusterPerformanceDiagnosticsParameters `json:"performanceDiagnostics,omitempty" tf:"performance_diagnostics,omitempty"`
// Resources allocated to hosts of the MySQL cluster. The structure is documented below.
// +kubebuilder:validation:Optional
Resources []MySQLClusterResourcesParameters `json:"resources,omitempty" tf:"resources,omitempty"`
// The cluster will be created from the specified backup. The structure is documented below.
// +kubebuilder:validation:Optional
Restore []MySQLClusterRestoreParameters `json:"restore,omitempty" tf:"restore,omitempty"`
// A set of ids of security groups assigned to hosts of the cluster.
// +crossplane:generate:reference:type=github.com/tagesjump/provider-upjet-yc/apis/vpc/v1alpha1.SecurityGroup
// +kubebuilder:validation:Optional
// +listType=set
SecurityGroupIds []*string `json:"securityGroupIds,omitempty" tf:"security_group_ids,omitempty"`
// References to SecurityGroup in vpc to populate securityGroupIds.
// +kubebuilder:validation:Optional
SecurityGroupIdsRefs []v1.Reference `json:"securityGroupIdsRefs,omitempty" tf:"-"`
// Selector for a list of SecurityGroup in vpc to populate securityGroupIds.
// +kubebuilder:validation:Optional
SecurityGroupIdsSelector *v1.Selector `json:"securityGroupIdsSelector,omitempty" tf:"-"`
// (Deprecated) To manage users, please switch to using a separate resource type yandex_mdb_mysql_user.
// +kubebuilder:validation:Optional
User []MySQLClusterUserParameters `json:"user,omitempty" tf:"user,omitempty"`
// Version of the MySQL cluster. (allowed versions are: 5.7, 8.0)
// +kubebuilder:validation:Optional
Version *string `json:"version,omitempty" tf:"version,omitempty"`
}
type MySQLClusterPerformanceDiagnosticsInitParameters struct {
// Enable performance diagnostics
Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"`
// Interval (in seconds) for my_stat_activity sampling Acceptable values are 1 to 86400, inclusive.
SessionsSamplingInterval *float64 `json:"sessionsSamplingInterval,omitempty" tf:"sessions_sampling_interval,omitempty"`
// Interval (in seconds) for my_stat_statements sampling Acceptable values are 1 to 86400, inclusive.
StatementsSamplingInterval *float64 `json:"statementsSamplingInterval,omitempty" tf:"statements_sampling_interval,omitempty"`
}
type MySQLClusterPerformanceDiagnosticsObservation struct {
// Enable performance diagnostics
Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"`
// Interval (in seconds) for my_stat_activity sampling Acceptable values are 1 to 86400, inclusive.
SessionsSamplingInterval *float64 `json:"sessionsSamplingInterval,omitempty" tf:"sessions_sampling_interval,omitempty"`
// Interval (in seconds) for my_stat_statements sampling Acceptable values are 1 to 86400, inclusive.
StatementsSamplingInterval *float64 `json:"statementsSamplingInterval,omitempty" tf:"statements_sampling_interval,omitempty"`
}
type MySQLClusterPerformanceDiagnosticsParameters struct {
// Enable performance diagnostics
// +kubebuilder:validation:Optional
Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"`
// Interval (in seconds) for my_stat_activity sampling Acceptable values are 1 to 86400, inclusive.
// +kubebuilder:validation:Optional
SessionsSamplingInterval *float64 `json:"sessionsSamplingInterval" tf:"sessions_sampling_interval,omitempty"`
// Interval (in seconds) for my_stat_statements sampling Acceptable values are 1 to 86400, inclusive.
// +kubebuilder:validation:Optional
StatementsSamplingInterval *float64 `json:"statementsSamplingInterval" tf:"statements_sampling_interval,omitempty"`
}
type MySQLClusterResourcesInitParameters struct {
// Volume of the storage available to a MySQL host, in gigabytes.
DiskSize *float64 `json:"diskSize,omitempty" tf:"disk_size,omitempty"`
// Type of the storage of MySQL hosts.
DiskTypeID *string `json:"diskTypeId,omitempty" tf:"disk_type_id,omitempty"`
ResourcePresetID *string `json:"resourcePresetId,omitempty" tf:"resource_preset_id,omitempty"`
}
type MySQLClusterResourcesObservation struct {
// Volume of the storage available to a MySQL host, in gigabytes.
DiskSize *float64 `json:"diskSize,omitempty" tf:"disk_size,omitempty"`
// Type of the storage of MySQL hosts.
DiskTypeID *string `json:"diskTypeId,omitempty" tf:"disk_type_id,omitempty"`
ResourcePresetID *string `json:"resourcePresetId,omitempty" tf:"resource_preset_id,omitempty"`
}
type MySQLClusterResourcesParameters struct {
// Volume of the storage available to a MySQL host, in gigabytes.
// +kubebuilder:validation:Optional
DiskSize *float64 `json:"diskSize" tf:"disk_size,omitempty"`
// Type of the storage of MySQL hosts.
// +kubebuilder:validation:Optional
DiskTypeID *string `json:"diskTypeId" tf:"disk_type_id,omitempty"`
// +kubebuilder:validation:Optional
ResourcePresetID *string `json:"resourcePresetId" tf:"resource_preset_id,omitempty"`
}
type MySQLClusterRestoreInitParameters struct {
// Backup ID. The cluster will be created from the specified backup. How to get a list of MySQL backups.
BackupID *string `json:"backupId,omitempty" tf:"backup_id,omitempty"`
// Timestamp of the moment to which the MySQL cluster should be restored. (Format: "2006-01-02T15:04:05" - UTC). When not set, current time is used.
Time *string `json:"time,omitempty" tf:"time,omitempty"`
}
type MySQLClusterRestoreObservation struct {
// Backup ID. The cluster will be created from the specified backup. How to get a list of MySQL backups.
BackupID *string `json:"backupId,omitempty" tf:"backup_id,omitempty"`
// Timestamp of the moment to which the MySQL cluster should be restored. (Format: "2006-01-02T15:04:05" - UTC). When not set, current time is used.
Time *string `json:"time,omitempty" tf:"time,omitempty"`
}
type MySQLClusterRestoreParameters struct {
// Backup ID. The cluster will be created from the specified backup. How to get a list of MySQL backups.
// +kubebuilder:validation:Optional
BackupID *string `json:"backupId" tf:"backup_id,omitempty"`
// Timestamp of the moment to which the MySQL cluster should be restored. (Format: "2006-01-02T15:04:05" - UTC). When not set, current time is used.
// +kubebuilder:validation:Optional
Time *string `json:"time,omitempty" tf:"time,omitempty"`
}
type MySQLClusterUserInitParameters struct {
// Authentication plugin. Allowed values: MYSQL_NATIVE_PASSWORD, CACHING_SHA2_PASSWORD, SHA256_PASSWORD (for version 5.7 MYSQL_NATIVE_PASSWORD, SHA256_PASSWORD)
AuthenticationPlugin *string `json:"authenticationPlugin,omitempty" tf:"authentication_plugin,omitempty"`
// User's connection limits. The structure is documented below.
// If the attribute is not specified there will be no changes.
ConnectionLimits []ConnectionLimitsInitParameters `json:"connectionLimits,omitempty" tf:"connection_limits,omitempty"`
// List user's global permissions
// Allowed permissions: REPLICATION_CLIENT, REPLICATION_SLAVE, PROCESS for clear list use empty list.
// If the attribute is not specified there will be no changes.
// +listType=set
GlobalPermissions []*string `json:"globalPermissions,omitempty" tf:"global_permissions,omitempty"`
// The name of the user.
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// Set of permissions granted to the user. The structure is documented below.
Permission []MySQLClusterUserPermissionInitParameters `json:"permission,omitempty" tf:"permission,omitempty"`
}
type MySQLClusterUserObservation struct {
// Authentication plugin. Allowed values: MYSQL_NATIVE_PASSWORD, CACHING_SHA2_PASSWORD, SHA256_PASSWORD (for version 5.7 MYSQL_NATIVE_PASSWORD, SHA256_PASSWORD)
AuthenticationPlugin *string `json:"authenticationPlugin,omitempty" tf:"authentication_plugin,omitempty"`
// User's connection limits. The structure is documented below.
// If the attribute is not specified there will be no changes.
ConnectionLimits []ConnectionLimitsObservation `json:"connectionLimits,omitempty" tf:"connection_limits,omitempty"`
// List user's global permissions
// Allowed permissions: REPLICATION_CLIENT, REPLICATION_SLAVE, PROCESS for clear list use empty list.
// If the attribute is not specified there will be no changes.
// +listType=set
GlobalPermissions []*string `json:"globalPermissions,omitempty" tf:"global_permissions,omitempty"`
// The name of the user.
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// Set of permissions granted to the user. The structure is documented below.
Permission []MySQLClusterUserPermissionObservation `json:"permission,omitempty" tf:"permission,omitempty"`
}
type MySQLClusterUserParameters struct {
// Authentication plugin. Allowed values: MYSQL_NATIVE_PASSWORD, CACHING_SHA2_PASSWORD, SHA256_PASSWORD (for version 5.7 MYSQL_NATIVE_PASSWORD, SHA256_PASSWORD)
// +kubebuilder:validation:Optional
AuthenticationPlugin *string `json:"authenticationPlugin,omitempty" tf:"authentication_plugin,omitempty"`
// User's connection limits. The structure is documented below.
// If the attribute is not specified there will be no changes.
// +kubebuilder:validation:Optional
ConnectionLimits []ConnectionLimitsParameters `json:"connectionLimits,omitempty" tf:"connection_limits,omitempty"`
// List user's global permissions
// Allowed permissions: REPLICATION_CLIENT, REPLICATION_SLAVE, PROCESS for clear list use empty list.
// If the attribute is not specified there will be no changes.
// +kubebuilder:validation:Optional
// +listType=set
GlobalPermissions []*string `json:"globalPermissions,omitempty" tf:"global_permissions,omitempty"`
// The name of the user.
// +kubebuilder:validation:Optional
Name *string `json:"name" tf:"name,omitempty"`
// The password of the user.
// +kubebuilder:validation:Required
PasswordSecretRef v1.SecretKeySelector `json:"passwordSecretRef" tf:"-"`
// Set of permissions granted to the user. The structure is documented below.
// +kubebuilder:validation:Optional
Permission []MySQLClusterUserPermissionParameters `json:"permission,omitempty" tf:"permission,omitempty"`
}
type MySQLClusterUserPermissionInitParameters struct {
// The name of the database that the permission grants access to.
DatabaseName *string `json:"databaseName,omitempty" tf:"database_name,omitempty"`
// List user's roles in the database.
// Allowed roles: ALL,ALTER,ALTER_ROUTINE,CREATE,CREATE_ROUTINE,CREATE_TEMPORARY_TABLES,
// CREATE_VIEW,DELETE,DROP,EVENT,EXECUTE,INDEX,INSERT,LOCK_TABLES,SELECT,SHOW_VIEW,TRIGGER,UPDATE.
Roles []*string `json:"roles,omitempty" tf:"roles,omitempty"`
}
type MySQLClusterUserPermissionObservation struct {
// The name of the database that the permission grants access to.
DatabaseName *string `json:"databaseName,omitempty" tf:"database_name,omitempty"`
// List user's roles in the database.
// Allowed roles: ALL,ALTER,ALTER_ROUTINE,CREATE,CREATE_ROUTINE,CREATE_TEMPORARY_TABLES,
// CREATE_VIEW,DELETE,DROP,EVENT,EXECUTE,INDEX,INSERT,LOCK_TABLES,SELECT,SHOW_VIEW,TRIGGER,UPDATE.
Roles []*string `json:"roles,omitempty" tf:"roles,omitempty"`
}
type MySQLClusterUserPermissionParameters struct {
// The name of the database that the permission grants access to.
// +kubebuilder:validation:Optional
DatabaseName *string `json:"databaseName" tf:"database_name,omitempty"`
// List user's roles in the database.
// Allowed roles: ALL,ALTER,ALTER_ROUTINE,CREATE,CREATE_ROUTINE,CREATE_TEMPORARY_TABLES,
// CREATE_VIEW,DELETE,DROP,EVENT,EXECUTE,INDEX,INSERT,LOCK_TABLES,SELECT,SHOW_VIEW,TRIGGER,UPDATE.
// +kubebuilder:validation:Optional
Roles []*string `json:"roles,omitempty" tf:"roles,omitempty"`
}
// MySQLClusterSpec defines the desired state of MySQLCluster
type MySQLClusterSpec struct {
v1.ResourceSpec `json:",inline"`
ForProvider MySQLClusterParameters `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 MySQLClusterInitParameters `json:"initProvider,omitempty"`
}
// MySQLClusterStatus defines the observed state of MySQLCluster.
type MySQLClusterStatus struct {
v1.ResourceStatus `json:",inline"`
AtProvider MySQLClusterObservation `json:"atProvider,omitempty"`
}
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:storageversion
// MySQLCluster is the Schema for the MySQLClusters API. Manages a MySQL cluster within Yandex.Cloud.
// +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,yandex-cloud}
type MySQLCluster 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.environment) || (has(self.initProvider) && has(self.initProvider.environment))",message="spec.forProvider.environment is a required parameter"
// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.host) || (has(self.initProvider) && has(self.initProvider.host))",message="spec.forProvider.host is a required parameter"
// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.name) || (has(self.initProvider) && has(self.initProvider.name))",message="spec.forProvider.name is a required parameter"
// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.resources) || (has(self.initProvider) && has(self.initProvider.resources))",message="spec.forProvider.resources is a required parameter"
// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.version) || (has(self.initProvider) && has(self.initProvider.version))",message="spec.forProvider.version is a required parameter"
Spec MySQLClusterSpec `json:"spec"`
Status MySQLClusterStatus `json:"status,omitempty"`
}
// +kubebuilder:object:root=true
// MySQLClusterList contains a list of MySQLClusters
type MySQLClusterList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []MySQLCluster `json:"items"`
}
// Repository type metadata.
var (
MySQLCluster_Kind = "MySQLCluster"
MySQLCluster_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: MySQLCluster_Kind}.String()
MySQLCluster_KindAPIVersion = MySQLCluster_Kind + "." + CRDGroupVersion.String()
MySQLCluster_GroupVersionKind = CRDGroupVersion.WithKind(MySQLCluster_Kind)
)
func init() {
SchemeBuilder.Register(&MySQLCluster{}, &MySQLClusterList{})
}