This repository has been archived by the owner on Oct 6, 2023. It is now read-only.
generated from pulumi/pulumi-tf-provider-boilerplate
/
mdbClickhouseCluster.go
996 lines (950 loc) · 42.6 KB
/
mdbClickhouseCluster.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
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package yandex
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a ClickHouse cluster within the Yandex.Cloud. For more information, see
// [the official documentation](https://cloud.yandex.com/docs/managed-clickhouse/concepts).
//
// ## Example Usage
//
// Example of creating a Single Node ClickHouse.
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-yandex/sdk/go/yandex"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// fooVpcNetwork, err := yandex.NewVpcNetwork(ctx, "fooVpcNetwork", nil)
// if err != nil {
// return err
// }
// fooVpcSubnet, err := yandex.NewVpcSubnet(ctx, "fooVpcSubnet", &yandex.VpcSubnetArgs{
// NetworkId: fooVpcNetwork.ID(),
// V4CidrBlocks: pulumi.StringArray{
// pulumi.String("10.5.0.0/24"),
// },
// Zone: pulumi.String("ru-central1-a"),
// })
// if err != nil {
// return err
// }
// _, err = yandex.NewMdbClickhouseCluster(ctx, "fooMdbClickhouseCluster", &yandex.MdbClickhouseClusterArgs{
// Clickhouse: &MdbClickhouseClusterClickhouseArgs{
// Config: &MdbClickhouseClusterClickhouseConfigArgs{
// BackgroundPoolSize: pulumi.Int(16),
// BackgroundSchedulePoolSize: pulumi.Int(16),
// Compression: []interface{}{
// map[string]interface{}{
// "method": "LZ4",
// "minPartSize": 1024,
// "minPartSizeRatio": 0.5,
// },
// map[string]interface{}{
// "method": "ZSTD",
// "minPartSize": 2048,
// "minPartSizeRatio": 0.7,
// },
// },
// GeobaseUri: pulumi.String(""),
// GraphiteRollup: []interface{}{
// map[string]interface{}{
// "name": "rollup1",
// "pattern": []map[string]interface{}{
// map[string]interface{}{
// "function": "func1",
// "regexp": "abc",
// "retention": []map[string]interface{}{
// map[string]interface{}{
// "age": 1000,
// "precision": 3,
// },
// },
// },
// },
// },
// map[string]interface{}{
// "name": "rollup2",
// "pattern": []map[string]interface{}{
// map[string]interface{}{
// "function": "func2",
// "retention": []map[string]interface{}{
// map[string]interface{}{
// "age": 2000,
// "precision": 5,
// },
// },
// },
// },
// },
// },
// Kafka: &MdbClickhouseClusterClickhouseConfigKafkaArgs{
// SaslMechanism: pulumi.String("SASL_MECHANISM_GSSAPI"),
// SaslPassword: pulumi.String("pass1"),
// SaslUsername: pulumi.String("user1"),
// SecurityProtocol: pulumi.String("SECURITY_PROTOCOL_PLAINTEXT"),
// },
// KafkaTopic: []interface{}{
// map[string]interface{}{
// "name": "topic1",
// "settings": map[string]interface{}{
// "saslMechanism": "SASL_MECHANISM_SCRAM_SHA_256",
// "saslPassword": "pass2",
// "saslUsername": "user2",
// "securityProtocol": "SECURITY_PROTOCOL_SSL",
// },
// },
// map[string]interface{}{
// "name": "topic2",
// "settings": map[string]interface{}{
// "saslMechanism": "SASL_MECHANISM_PLAIN",
// "securityProtocol": "SECURITY_PROTOCOL_SASL_PLAINTEXT",
// },
// },
// },
// KeepAliveTimeout: pulumi.Int(3000),
// LogLevel: pulumi.String("TRACE"),
// MarkCacheSize: pulumi.Int(5368709120),
// MaxConcurrentQueries: pulumi.Int(50),
// MaxConnections: pulumi.Int(100),
// MaxPartitionSizeToDrop: pulumi.Int(53687091200),
// MaxTableSizeToDrop: pulumi.Int(53687091200),
// MergeTree: &MdbClickhouseClusterClickhouseConfigMergeTreeArgs{
// MaxBytesToMergeAtMinSpaceInPool: pulumi.Int(1048576),
// MaxReplicatedMergesInQueue: pulumi.Int(16),
// NumberOfFreeEntriesInPoolToLowerMaxSizeOfMerge: pulumi.Int(8),
// PartsToDelayInsert: pulumi.Int(150),
// PartsToThrowInsert: pulumi.Int(300),
// ReplicatedDeduplicationWindow: pulumi.Int(100),
// ReplicatedDeduplicationWindowSeconds: pulumi.Int(604800),
// },
// MetricLogEnabled: pulumi.Bool(true),
// MetricLogRetentionSize: pulumi.Int(536870912),
// MetricLogRetentionTime: pulumi.Int(2592000),
// PartLogRetentionSize: pulumi.Int(536870912),
// PartLogRetentionTime: pulumi.Int(2592000),
// QueryLogRetentionSize: pulumi.Int(1073741824),
// QueryLogRetentionTime: pulumi.Int(2592000),
// QueryThreadLogEnabled: pulumi.Bool(true),
// QueryThreadLogRetentionSize: pulumi.Int(536870912),
// QueryThreadLogRetentionTime: pulumi.Int(2592000),
// Rabbitmq: &MdbClickhouseClusterClickhouseConfigRabbitmqArgs{
// Password: pulumi.String("rabbit_pass"),
// Username: pulumi.String("rabbit_user"),
// },
// TextLogEnabled: pulumi.Bool(true),
// TextLogLevel: pulumi.String("TRACE"),
// TextLogRetentionSize: pulumi.Int(536870912),
// TextLogRetentionTime: pulumi.Int(2592000),
// Timezone: pulumi.String("UTC"),
// TraceLogEnabled: pulumi.Bool(true),
// TraceLogRetentionSize: pulumi.Int(536870912),
// TraceLogRetentionTime: pulumi.Int(2592000),
// UncompressedCacheSize: pulumi.Int(8589934592),
// },
// Resources: &MdbClickhouseClusterClickhouseResourcesArgs{
// DiskSize: pulumi.Int(32),
// DiskTypeId: pulumi.String("network-ssd"),
// ResourcePresetId: pulumi.String("s2.micro"),
// },
// },
// CloudStorage: &MdbClickhouseClusterCloudStorageArgs{
// Enabled: pulumi.Bool(false),
// },
// Databases: MdbClickhouseClusterDatabaseArray{
// &MdbClickhouseClusterDatabaseArgs{
// Name: pulumi.String("db_name"),
// },
// },
// Environment: pulumi.String("PRESTABLE"),
// FormatSchemas: MdbClickhouseClusterFormatSchemaArray{
// &MdbClickhouseClusterFormatSchemaArgs{
// Name: pulumi.String("test_schema"),
// Type: pulumi.String("FORMAT_SCHEMA_TYPE_CAPNPROTO"),
// Uri: pulumi.String("https://storage.yandexcloud.net/ch-data/schema.proto"),
// },
// },
// Hosts: MdbClickhouseClusterHostArray{
// &MdbClickhouseClusterHostArgs{
// SubnetId: fooVpcSubnet.ID(),
// Type: pulumi.String("CLICKHOUSE"),
// Zone: pulumi.String("ru-central1-a"),
// },
// },
// MaintenanceWindow: &MdbClickhouseClusterMaintenanceWindowArgs{
// Type: pulumi.String("ANYTIME"),
// },
// MlModels: MdbClickhouseClusterMlModelArray{
// &MdbClickhouseClusterMlModelArgs{
// Name: pulumi.String("test_model"),
// Type: pulumi.String("ML_MODEL_TYPE_CATBOOST"),
// Uri: pulumi.String("https://storage.yandexcloud.net/ch-data/train.csv"),
// },
// },
// NetworkId: fooVpcNetwork.ID(),
// ServiceAccountId: pulumi.String("your_service_account_id"),
// Users: MdbClickhouseClusterUserArray{
// &MdbClickhouseClusterUserArgs{
// Name: pulumi.String("user"),
// Password: pulumi.String("your_password"),
// Permissions: MdbClickhouseClusterUserPermissionArray{
// &MdbClickhouseClusterUserPermissionArgs{
// DatabaseName: pulumi.String("db_name"),
// },
// },
// Quotas: MdbClickhouseClusterUserQuotaArray{
// &MdbClickhouseClusterUserQuotaArgs{
// Errors: pulumi.Int(1000),
// IntervalDuration: pulumi.Int(3600000),
// Queries: pulumi.Int(10000),
// },
// &MdbClickhouseClusterUserQuotaArgs{
// Error: 5000,
// IntervalDuration: pulumi.Int(79800000),
// Queries: pulumi.Int(50000),
// },
// },
// Settings: &MdbClickhouseClusterUserSettingsArgs{
// MaxMemoryUsageForUser: pulumi.Int(1000000000),
// OutputFormatJsonQuote64bitIntegers: pulumi.Bool(true),
// ReadOverflowMode: pulumi.String("throw"),
// },
// },
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
//
// Example of creating a HA ClickHouse Cluster.
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-yandex/sdk/go/yandex"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// fooVpcNetwork, err := yandex.NewVpcNetwork(ctx, "fooVpcNetwork", nil)
// if err != nil {
// return err
// }
// fooVpcSubnet, err := yandex.NewVpcSubnet(ctx, "fooVpcSubnet", &yandex.VpcSubnetArgs{
// NetworkId: fooVpcNetwork.ID(),
// V4CidrBlocks: pulumi.StringArray{
// pulumi.String("10.1.0.0/24"),
// },
// Zone: pulumi.String("ru-central1-a"),
// })
// if err != nil {
// return err
// }
// bar, err := yandex.NewVpcSubnet(ctx, "bar", &yandex.VpcSubnetArgs{
// NetworkId: fooVpcNetwork.ID(),
// V4CidrBlocks: pulumi.StringArray{
// pulumi.String("10.2.0.0/24"),
// },
// Zone: pulumi.String("ru-central1-b"),
// })
// if err != nil {
// return err
// }
// baz, err := yandex.NewVpcSubnet(ctx, "baz", &yandex.VpcSubnetArgs{
// NetworkId: fooVpcNetwork.ID(),
// V4CidrBlocks: pulumi.StringArray{
// pulumi.String("10.3.0.0/24"),
// },
// Zone: pulumi.String("ru-central1-c"),
// })
// if err != nil {
// return err
// }
// _, err = yandex.NewMdbClickhouseCluster(ctx, "fooMdbClickhouseCluster", &yandex.MdbClickhouseClusterArgs{
// Clickhouse: &MdbClickhouseClusterClickhouseArgs{
// Resources: &MdbClickhouseClusterClickhouseResourcesArgs{
// DiskSize: pulumi.Int(16),
// DiskTypeId: pulumi.String("network-ssd"),
// ResourcePresetId: pulumi.String("s2.micro"),
// },
// },
// CloudStorage: &MdbClickhouseClusterCloudStorageArgs{
// Enabled: pulumi.Bool(false),
// },
// Databases: MdbClickhouseClusterDatabaseArray{
// &MdbClickhouseClusterDatabaseArgs{
// Name: pulumi.String("db_name"),
// },
// },
// Environment: pulumi.String("PRESTABLE"),
// Hosts: MdbClickhouseClusterHostArray{
// &MdbClickhouseClusterHostArgs{
// SubnetId: fooVpcSubnet.ID(),
// Type: pulumi.String("CLICKHOUSE"),
// Zone: pulumi.String("ru-central1-a"),
// },
// &MdbClickhouseClusterHostArgs{
// SubnetId: bar.ID(),
// Type: pulumi.String("CLICKHOUSE"),
// Zone: pulumi.String("ru-central1-b"),
// },
// &MdbClickhouseClusterHostArgs{
// SubnetId: fooVpcSubnet.ID(),
// Type: pulumi.String("ZOOKEEPER"),
// Zone: pulumi.String("ru-central1-a"),
// },
// &MdbClickhouseClusterHostArgs{
// SubnetId: bar.ID(),
// Type: pulumi.String("ZOOKEEPER"),
// Zone: pulumi.String("ru-central1-b"),
// },
// &MdbClickhouseClusterHostArgs{
// SubnetId: baz.ID(),
// Type: pulumi.String("ZOOKEEPER"),
// Zone: pulumi.String("ru-central1-c"),
// },
// },
// NetworkId: fooVpcNetwork.ID(),
// Users: MdbClickhouseClusterUserArray{
// &MdbClickhouseClusterUserArgs{
// Name: pulumi.String("user"),
// Password: pulumi.String("password"),
// Permissions: MdbClickhouseClusterUserPermissionArray{
// &MdbClickhouseClusterUserPermissionArgs{
// DatabaseName: pulumi.String("db_name"),
// },
// },
// Quotas: MdbClickhouseClusterUserQuotaArray{
// &MdbClickhouseClusterUserQuotaArgs{
// Errors: pulumi.Int(1000),
// IntervalDuration: pulumi.Int(3600000),
// Queries: pulumi.Int(10000),
// },
// &MdbClickhouseClusterUserQuotaArgs{
// Error: 5000,
// IntervalDuration: pulumi.Int(79800000),
// Queries: pulumi.Int(50000),
// },
// },
// Settings: &MdbClickhouseClusterUserSettingsArgs{
// MaxMemoryUsageForUser: pulumi.Int(1000000000),
// OutputFormatJsonQuote64bitIntegers: pulumi.Bool(true),
// ReadOverflowMode: pulumi.String("throw"),
// },
// },
// },
// Zookeeper: &MdbClickhouseClusterZookeeperArgs{
// Resources: &MdbClickhouseClusterZookeeperResourcesArgs{
// DiskSize: pulumi.Int(10),
// DiskTypeId: pulumi.String("network-ssd"),
// ResourcePresetId: pulumi.String("s2.micro"),
// },
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
//
// Example of creating a sharded ClickHouse Cluster.
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-yandex/sdk/go/yandex"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// fooVpcNetwork, err := yandex.NewVpcNetwork(ctx, "fooVpcNetwork", nil)
// if err != nil {
// return err
// }
// fooVpcSubnet, err := yandex.NewVpcSubnet(ctx, "fooVpcSubnet", &yandex.VpcSubnetArgs{
// NetworkId: fooVpcNetwork.ID(),
// V4CidrBlocks: pulumi.StringArray{
// pulumi.String("10.1.0.0/24"),
// },
// Zone: pulumi.String("ru-central1-a"),
// })
// if err != nil {
// return err
// }
// bar, err := yandex.NewVpcSubnet(ctx, "bar", &yandex.VpcSubnetArgs{
// NetworkId: fooVpcNetwork.ID(),
// V4CidrBlocks: pulumi.StringArray{
// pulumi.String("10.2.0.0/24"),
// },
// Zone: pulumi.String("ru-central1-b"),
// })
// if err != nil {
// return err
// }
// baz, err := yandex.NewVpcSubnet(ctx, "baz", &yandex.VpcSubnetArgs{
// NetworkId: fooVpcNetwork.ID(),
// V4CidrBlocks: pulumi.StringArray{
// pulumi.String("10.3.0.0/24"),
// },
// Zone: pulumi.String("ru-central1-c"),
// })
// if err != nil {
// return err
// }
// _, err = yandex.NewMdbClickhouseCluster(ctx, "fooMdbClickhouseCluster", &yandex.MdbClickhouseClusterArgs{
// Clickhouse: &MdbClickhouseClusterClickhouseArgs{
// Resources: &MdbClickhouseClusterClickhouseResourcesArgs{
// DiskSize: pulumi.Int(16),
// DiskTypeId: pulumi.String("network-ssd"),
// ResourcePresetId: pulumi.String("s2.micro"),
// },
// },
// CloudStorage: &MdbClickhouseClusterCloudStorageArgs{
// Enabled: pulumi.Bool(false),
// },
// Databases: MdbClickhouseClusterDatabaseArray{
// &MdbClickhouseClusterDatabaseArgs{
// Name: pulumi.String("db_name"),
// },
// },
// Environment: pulumi.String("PRODUCTION"),
// Hosts: MdbClickhouseClusterHostArray{
// &MdbClickhouseClusterHostArgs{
// ShardName: pulumi.String("shard1"),
// SubnetId: fooVpcSubnet.ID(),
// Type: pulumi.String("CLICKHOUSE"),
// Zone: pulumi.String("ru-central1-a"),
// },
// &MdbClickhouseClusterHostArgs{
// ShardName: pulumi.String("shard1"),
// SubnetId: bar.ID(),
// Type: pulumi.String("CLICKHOUSE"),
// Zone: pulumi.String("ru-central1-b"),
// },
// &MdbClickhouseClusterHostArgs{
// ShardName: pulumi.String("shard2"),
// SubnetId: bar.ID(),
// Type: pulumi.String("CLICKHOUSE"),
// Zone: pulumi.String("ru-central1-b"),
// },
// &MdbClickhouseClusterHostArgs{
// ShardName: pulumi.String("shard2"),
// SubnetId: baz.ID(),
// Type: pulumi.String("CLICKHOUSE"),
// Zone: pulumi.String("ru-central1-c"),
// },
// },
// NetworkId: fooVpcNetwork.ID(),
// ShardGroups: MdbClickhouseClusterShardGroupArray{
// &MdbClickhouseClusterShardGroupArgs{
// Description: pulumi.String("Cluster configuration that contain only shard1"),
// Name: pulumi.String("single_shard_group"),
// ShardNames: pulumi.StringArray{
// pulumi.String("shard1"),
// },
// },
// },
// Users: MdbClickhouseClusterUserArray{
// &MdbClickhouseClusterUserArgs{
// Name: pulumi.String("user"),
// Password: pulumi.String("password"),
// Permissions: MdbClickhouseClusterUserPermissionArray{
// &MdbClickhouseClusterUserPermissionArgs{
// DatabaseName: pulumi.String("db_name"),
// },
// },
// Quotas: MdbClickhouseClusterUserQuotaArray{
// &MdbClickhouseClusterUserQuotaArgs{
// Errors: pulumi.Int(1000),
// IntervalDuration: pulumi.Int(3600000),
// Queries: pulumi.Int(10000),
// },
// &MdbClickhouseClusterUserQuotaArgs{
// Error: 5000,
// IntervalDuration: pulumi.Int(79800000),
// Queries: pulumi.Int(50000),
// },
// },
// Settings: &MdbClickhouseClusterUserSettingsArgs{
// MaxMemoryUsageForUser: pulumi.Int(1000000000),
// OutputFormatJsonQuote64bitIntegers: pulumi.Bool(true),
// ReadOverflowMode: pulumi.String("throw"),
// },
// },
// },
// Zookeeper: &MdbClickhouseClusterZookeeperArgs{
// Resources: &MdbClickhouseClusterZookeeperResourcesArgs{
// DiskSize: pulumi.Int(10),
// DiskTypeId: pulumi.String("network-ssd"),
// ResourcePresetId: pulumi.String("s2.micro"),
// },
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
//
// ## Import
//
// A cluster can be imported using the `id` of the resource, e.g.
//
// ```sh
// $ pulumi import yandex:index/mdbClickhouseCluster:MdbClickhouseCluster foo cluster_id
// ```
type MdbClickhouseCluster struct {
pulumi.CustomResourceState
// Access policy to the ClickHouse cluster. The structure is documented below.
Access MdbClickhouseClusterAccessOutput `pulumi:"access"`
// A password used to authorize as user `admin` when `sqlUserManagement` enabled.
AdminPassword pulumi.StringPtrOutput `pulumi:"adminPassword"`
// Time to start the daily backup, in the UTC timezone. The structure is documented below.
BackupWindowStart MdbClickhouseClusterBackupWindowStartOutput `pulumi:"backupWindowStart"`
// Configuration of the ClickHouse subcluster. The structure is documented below.
Clickhouse MdbClickhouseClusterClickhouseOutput `pulumi:"clickhouse"`
CloudStorage MdbClickhouseClusterCloudStoragePtrOutput `pulumi:"cloudStorage"`
// Whether to copy schema on new ClickHouse hosts.
CopySchemaOnNewHosts pulumi.BoolPtrOutput `pulumi:"copySchemaOnNewHosts"`
// Timestamp of cluster creation.
CreatedAt pulumi.StringOutput `pulumi:"createdAt"`
// A database of the ClickHouse cluster. The structure is documented below.
Databases MdbClickhouseClusterDatabaseArrayOutput `pulumi:"databases"`
// Inhibits deletion of the cluster. Can be either `true` or `false`.
DeletionProtection pulumi.BoolOutput `pulumi:"deletionProtection"`
// Description of the shard group.
Description pulumi.StringPtrOutput `pulumi:"description"`
// Deployment environment of the ClickHouse cluster. Can be either `PRESTABLE` or `PRODUCTION`.
Environment pulumi.StringOutput `pulumi:"environment"`
// The ID of the folder that the resource belongs to. If it
// is not provided, the default provider folder is used.
FolderId pulumi.StringOutput `pulumi:"folderId"`
// A set of protobuf or capnproto format schemas. The structure is documented below.
FormatSchemas MdbClickhouseClusterFormatSchemaArrayOutput `pulumi:"formatSchemas"`
// Aggregated health of the cluster. Can be `ALIVE`, `DEGRADED`, `DEAD` or `HEALTH_UNKNOWN`.
// For more information see `health` field of JSON representation in [the official documentation](https://cloud.yandex.com/docs/managed-clickhouse/api-ref/Cluster/).
Health pulumi.StringOutput `pulumi:"health"`
// A host of the ClickHouse cluster. The structure is documented below.
Hosts MdbClickhouseClusterHostArrayOutput `pulumi:"hosts"`
// A set of key/value label pairs to assign to the ClickHouse cluster.
Labels pulumi.StringMapOutput `pulumi:"labels"`
MaintenanceWindow MdbClickhouseClusterMaintenanceWindowOutput `pulumi:"maintenanceWindow"`
// A group of machine learning models. The structure is documented below
MlModels MdbClickhouseClusterMlModelArrayOutput `pulumi:"mlModels"`
// Graphite rollup configuration name.
Name pulumi.StringOutput `pulumi:"name"`
// ID of the network, to which the ClickHouse cluster belongs.
NetworkId pulumi.StringOutput `pulumi:"networkId"`
// A set of ids of security groups assigned to hosts of the cluster.
SecurityGroupIds pulumi.StringArrayOutput `pulumi:"securityGroupIds"`
// ID of the service account used for access to Yandex Object Storage.
ServiceAccountId pulumi.StringOutput `pulumi:"serviceAccountId"`
// A group of clickhouse shards. The structure is documented below.
ShardGroups MdbClickhouseClusterShardGroupArrayOutput `pulumi:"shardGroups"`
// Grants `admin` user database management permission.
SqlDatabaseManagement pulumi.BoolOutput `pulumi:"sqlDatabaseManagement"`
// Enables `admin` user with user management permission.
SqlUserManagement pulumi.BoolOutput `pulumi:"sqlUserManagement"`
// Status of the cluster. Can be `CREATING`, `STARTING`, `RUNNING`, `UPDATING`, `STOPPING`, `STOPPED`, `ERROR` or `STATUS_UNKNOWN`.
// For more information see `status` field of JSON representation in [the official documentation](https://cloud.yandex.com/docs/managed-clickhouse/api-ref/Cluster/).
Status pulumi.StringOutput `pulumi:"status"`
// A user of the ClickHouse cluster. The structure is documented below.
Users MdbClickhouseClusterUserArrayOutput `pulumi:"users"`
// Version of the ClickHouse server software.
Version pulumi.StringOutput `pulumi:"version"`
// Configuration of the ZooKeeper subcluster. The structure is documented below.
Zookeeper MdbClickhouseClusterZookeeperOutput `pulumi:"zookeeper"`
}
// NewMdbClickhouseCluster registers a new resource with the given unique name, arguments, and options.
func NewMdbClickhouseCluster(ctx *pulumi.Context,
name string, args *MdbClickhouseClusterArgs, opts ...pulumi.ResourceOption) (*MdbClickhouseCluster, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Clickhouse == nil {
return nil, errors.New("invalid value for required argument 'Clickhouse'")
}
if args.Environment == nil {
return nil, errors.New("invalid value for required argument 'Environment'")
}
if args.Hosts == nil {
return nil, errors.New("invalid value for required argument 'Hosts'")
}
if args.NetworkId == nil {
return nil, errors.New("invalid value for required argument 'NetworkId'")
}
var resource MdbClickhouseCluster
err := ctx.RegisterResource("yandex:index/mdbClickhouseCluster:MdbClickhouseCluster", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetMdbClickhouseCluster gets an existing MdbClickhouseCluster resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetMdbClickhouseCluster(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *MdbClickhouseClusterState, opts ...pulumi.ResourceOption) (*MdbClickhouseCluster, error) {
var resource MdbClickhouseCluster
err := ctx.ReadResource("yandex:index/mdbClickhouseCluster:MdbClickhouseCluster", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering MdbClickhouseCluster resources.
type mdbClickhouseClusterState struct {
// Access policy to the ClickHouse cluster. The structure is documented below.
Access *MdbClickhouseClusterAccess `pulumi:"access"`
// A password used to authorize as user `admin` when `sqlUserManagement` enabled.
AdminPassword *string `pulumi:"adminPassword"`
// Time to start the daily backup, in the UTC timezone. The structure is documented below.
BackupWindowStart *MdbClickhouseClusterBackupWindowStart `pulumi:"backupWindowStart"`
// Configuration of the ClickHouse subcluster. The structure is documented below.
Clickhouse *MdbClickhouseClusterClickhouse `pulumi:"clickhouse"`
CloudStorage *MdbClickhouseClusterCloudStorage `pulumi:"cloudStorage"`
// Whether to copy schema on new ClickHouse hosts.
CopySchemaOnNewHosts *bool `pulumi:"copySchemaOnNewHosts"`
// Timestamp of cluster creation.
CreatedAt *string `pulumi:"createdAt"`
// A database of the ClickHouse cluster. The structure is documented below.
Databases []MdbClickhouseClusterDatabase `pulumi:"databases"`
// Inhibits deletion of the cluster. Can be either `true` or `false`.
DeletionProtection *bool `pulumi:"deletionProtection"`
// Description of the shard group.
Description *string `pulumi:"description"`
// Deployment environment of the ClickHouse cluster. Can be either `PRESTABLE` or `PRODUCTION`.
Environment *string `pulumi:"environment"`
// The ID of the folder that the resource belongs to. If it
// is not provided, the default provider folder is used.
FolderId *string `pulumi:"folderId"`
// A set of protobuf or capnproto format schemas. The structure is documented below.
FormatSchemas []MdbClickhouseClusterFormatSchema `pulumi:"formatSchemas"`
// Aggregated health of the cluster. Can be `ALIVE`, `DEGRADED`, `DEAD` or `HEALTH_UNKNOWN`.
// For more information see `health` field of JSON representation in [the official documentation](https://cloud.yandex.com/docs/managed-clickhouse/api-ref/Cluster/).
Health *string `pulumi:"health"`
// A host of the ClickHouse cluster. The structure is documented below.
Hosts []MdbClickhouseClusterHost `pulumi:"hosts"`
// A set of key/value label pairs to assign to the ClickHouse cluster.
Labels map[string]string `pulumi:"labels"`
MaintenanceWindow *MdbClickhouseClusterMaintenanceWindow `pulumi:"maintenanceWindow"`
// A group of machine learning models. The structure is documented below
MlModels []MdbClickhouseClusterMlModel `pulumi:"mlModels"`
// Graphite rollup configuration name.
Name *string `pulumi:"name"`
// ID of the network, to which the ClickHouse cluster belongs.
NetworkId *string `pulumi:"networkId"`
// A set of ids of security groups assigned to hosts of the cluster.
SecurityGroupIds []string `pulumi:"securityGroupIds"`
// ID of the service account used for access to Yandex Object Storage.
ServiceAccountId *string `pulumi:"serviceAccountId"`
// A group of clickhouse shards. The structure is documented below.
ShardGroups []MdbClickhouseClusterShardGroup `pulumi:"shardGroups"`
// Grants `admin` user database management permission.
SqlDatabaseManagement *bool `pulumi:"sqlDatabaseManagement"`
// Enables `admin` user with user management permission.
SqlUserManagement *bool `pulumi:"sqlUserManagement"`
// Status of the cluster. Can be `CREATING`, `STARTING`, `RUNNING`, `UPDATING`, `STOPPING`, `STOPPED`, `ERROR` or `STATUS_UNKNOWN`.
// For more information see `status` field of JSON representation in [the official documentation](https://cloud.yandex.com/docs/managed-clickhouse/api-ref/Cluster/).
Status *string `pulumi:"status"`
// A user of the ClickHouse cluster. The structure is documented below.
Users []MdbClickhouseClusterUser `pulumi:"users"`
// Version of the ClickHouse server software.
Version *string `pulumi:"version"`
// Configuration of the ZooKeeper subcluster. The structure is documented below.
Zookeeper *MdbClickhouseClusterZookeeper `pulumi:"zookeeper"`
}
type MdbClickhouseClusterState struct {
// Access policy to the ClickHouse cluster. The structure is documented below.
Access MdbClickhouseClusterAccessPtrInput
// A password used to authorize as user `admin` when `sqlUserManagement` enabled.
AdminPassword pulumi.StringPtrInput
// Time to start the daily backup, in the UTC timezone. The structure is documented below.
BackupWindowStart MdbClickhouseClusterBackupWindowStartPtrInput
// Configuration of the ClickHouse subcluster. The structure is documented below.
Clickhouse MdbClickhouseClusterClickhousePtrInput
CloudStorage MdbClickhouseClusterCloudStoragePtrInput
// Whether to copy schema on new ClickHouse hosts.
CopySchemaOnNewHosts pulumi.BoolPtrInput
// Timestamp of cluster creation.
CreatedAt pulumi.StringPtrInput
// A database of the ClickHouse cluster. The structure is documented below.
Databases MdbClickhouseClusterDatabaseArrayInput
// Inhibits deletion of the cluster. Can be either `true` or `false`.
DeletionProtection pulumi.BoolPtrInput
// Description of the shard group.
Description pulumi.StringPtrInput
// Deployment environment of the ClickHouse cluster. Can be either `PRESTABLE` or `PRODUCTION`.
Environment pulumi.StringPtrInput
// The ID of the folder that the resource belongs to. If it
// is not provided, the default provider folder is used.
FolderId pulumi.StringPtrInput
// A set of protobuf or capnproto format schemas. The structure is documented below.
FormatSchemas MdbClickhouseClusterFormatSchemaArrayInput
// Aggregated health of the cluster. Can be `ALIVE`, `DEGRADED`, `DEAD` or `HEALTH_UNKNOWN`.
// For more information see `health` field of JSON representation in [the official documentation](https://cloud.yandex.com/docs/managed-clickhouse/api-ref/Cluster/).
Health pulumi.StringPtrInput
// A host of the ClickHouse cluster. The structure is documented below.
Hosts MdbClickhouseClusterHostArrayInput
// A set of key/value label pairs to assign to the ClickHouse cluster.
Labels pulumi.StringMapInput
MaintenanceWindow MdbClickhouseClusterMaintenanceWindowPtrInput
// A group of machine learning models. The structure is documented below
MlModels MdbClickhouseClusterMlModelArrayInput
// Graphite rollup configuration name.
Name pulumi.StringPtrInput
// ID of the network, to which the ClickHouse cluster belongs.
NetworkId pulumi.StringPtrInput
// A set of ids of security groups assigned to hosts of the cluster.
SecurityGroupIds pulumi.StringArrayInput
// ID of the service account used for access to Yandex Object Storage.
ServiceAccountId pulumi.StringPtrInput
// A group of clickhouse shards. The structure is documented below.
ShardGroups MdbClickhouseClusterShardGroupArrayInput
// Grants `admin` user database management permission.
SqlDatabaseManagement pulumi.BoolPtrInput
// Enables `admin` user with user management permission.
SqlUserManagement pulumi.BoolPtrInput
// Status of the cluster. Can be `CREATING`, `STARTING`, `RUNNING`, `UPDATING`, `STOPPING`, `STOPPED`, `ERROR` or `STATUS_UNKNOWN`.
// For more information see `status` field of JSON representation in [the official documentation](https://cloud.yandex.com/docs/managed-clickhouse/api-ref/Cluster/).
Status pulumi.StringPtrInput
// A user of the ClickHouse cluster. The structure is documented below.
Users MdbClickhouseClusterUserArrayInput
// Version of the ClickHouse server software.
Version pulumi.StringPtrInput
// Configuration of the ZooKeeper subcluster. The structure is documented below.
Zookeeper MdbClickhouseClusterZookeeperPtrInput
}
func (MdbClickhouseClusterState) ElementType() reflect.Type {
return reflect.TypeOf((*mdbClickhouseClusterState)(nil)).Elem()
}
type mdbClickhouseClusterArgs struct {
// Access policy to the ClickHouse cluster. The structure is documented below.
Access *MdbClickhouseClusterAccess `pulumi:"access"`
// A password used to authorize as user `admin` when `sqlUserManagement` enabled.
AdminPassword *string `pulumi:"adminPassword"`
// Time to start the daily backup, in the UTC timezone. The structure is documented below.
BackupWindowStart *MdbClickhouseClusterBackupWindowStart `pulumi:"backupWindowStart"`
// Configuration of the ClickHouse subcluster. The structure is documented below.
Clickhouse MdbClickhouseClusterClickhouse `pulumi:"clickhouse"`
CloudStorage *MdbClickhouseClusterCloudStorage `pulumi:"cloudStorage"`
// Whether to copy schema on new ClickHouse hosts.
CopySchemaOnNewHosts *bool `pulumi:"copySchemaOnNewHosts"`
// A database of the ClickHouse cluster. The structure is documented below.
Databases []MdbClickhouseClusterDatabase `pulumi:"databases"`
// Inhibits deletion of the cluster. Can be either `true` or `false`.
DeletionProtection *bool `pulumi:"deletionProtection"`
// Description of the shard group.
Description *string `pulumi:"description"`
// Deployment environment of the ClickHouse cluster. Can be either `PRESTABLE` or `PRODUCTION`.
Environment string `pulumi:"environment"`
// The ID of the folder that the resource belongs to. If it
// is not provided, the default provider folder is used.
FolderId *string `pulumi:"folderId"`
// A set of protobuf or capnproto format schemas. The structure is documented below.
FormatSchemas []MdbClickhouseClusterFormatSchema `pulumi:"formatSchemas"`
// A host of the ClickHouse cluster. The structure is documented below.
Hosts []MdbClickhouseClusterHost `pulumi:"hosts"`
// A set of key/value label pairs to assign to the ClickHouse cluster.
Labels map[string]string `pulumi:"labels"`
MaintenanceWindow *MdbClickhouseClusterMaintenanceWindow `pulumi:"maintenanceWindow"`
// A group of machine learning models. The structure is documented below
MlModels []MdbClickhouseClusterMlModel `pulumi:"mlModels"`
// Graphite rollup configuration name.
Name *string `pulumi:"name"`
// ID of the network, to which the ClickHouse cluster belongs.
NetworkId string `pulumi:"networkId"`
// A set of ids of security groups assigned to hosts of the cluster.
SecurityGroupIds []string `pulumi:"securityGroupIds"`
// ID of the service account used for access to Yandex Object Storage.
ServiceAccountId *string `pulumi:"serviceAccountId"`
// A group of clickhouse shards. The structure is documented below.
ShardGroups []MdbClickhouseClusterShardGroup `pulumi:"shardGroups"`
// Grants `admin` user database management permission.
SqlDatabaseManagement *bool `pulumi:"sqlDatabaseManagement"`
// Enables `admin` user with user management permission.
SqlUserManagement *bool `pulumi:"sqlUserManagement"`
// A user of the ClickHouse cluster. The structure is documented below.
Users []MdbClickhouseClusterUser `pulumi:"users"`
// Version of the ClickHouse server software.
Version *string `pulumi:"version"`
// Configuration of the ZooKeeper subcluster. The structure is documented below.
Zookeeper *MdbClickhouseClusterZookeeper `pulumi:"zookeeper"`
}
// The set of arguments for constructing a MdbClickhouseCluster resource.
type MdbClickhouseClusterArgs struct {
// Access policy to the ClickHouse cluster. The structure is documented below.
Access MdbClickhouseClusterAccessPtrInput
// A password used to authorize as user `admin` when `sqlUserManagement` enabled.
AdminPassword pulumi.StringPtrInput
// Time to start the daily backup, in the UTC timezone. The structure is documented below.
BackupWindowStart MdbClickhouseClusterBackupWindowStartPtrInput
// Configuration of the ClickHouse subcluster. The structure is documented below.
Clickhouse MdbClickhouseClusterClickhouseInput
CloudStorage MdbClickhouseClusterCloudStoragePtrInput
// Whether to copy schema on new ClickHouse hosts.
CopySchemaOnNewHosts pulumi.BoolPtrInput
// A database of the ClickHouse cluster. The structure is documented below.
Databases MdbClickhouseClusterDatabaseArrayInput
// Inhibits deletion of the cluster. Can be either `true` or `false`.
DeletionProtection pulumi.BoolPtrInput
// Description of the shard group.
Description pulumi.StringPtrInput
// Deployment environment of the ClickHouse cluster. Can be either `PRESTABLE` or `PRODUCTION`.
Environment pulumi.StringInput
// The ID of the folder that the resource belongs to. If it
// is not provided, the default provider folder is used.
FolderId pulumi.StringPtrInput
// A set of protobuf or capnproto format schemas. The structure is documented below.
FormatSchemas MdbClickhouseClusterFormatSchemaArrayInput
// A host of the ClickHouse cluster. The structure is documented below.
Hosts MdbClickhouseClusterHostArrayInput
// A set of key/value label pairs to assign to the ClickHouse cluster.
Labels pulumi.StringMapInput
MaintenanceWindow MdbClickhouseClusterMaintenanceWindowPtrInput
// A group of machine learning models. The structure is documented below
MlModels MdbClickhouseClusterMlModelArrayInput
// Graphite rollup configuration name.
Name pulumi.StringPtrInput
// ID of the network, to which the ClickHouse cluster belongs.
NetworkId pulumi.StringInput
// A set of ids of security groups assigned to hosts of the cluster.
SecurityGroupIds pulumi.StringArrayInput
// ID of the service account used for access to Yandex Object Storage.
ServiceAccountId pulumi.StringPtrInput
// A group of clickhouse shards. The structure is documented below.
ShardGroups MdbClickhouseClusterShardGroupArrayInput
// Grants `admin` user database management permission.
SqlDatabaseManagement pulumi.BoolPtrInput
// Enables `admin` user with user management permission.
SqlUserManagement pulumi.BoolPtrInput
// A user of the ClickHouse cluster. The structure is documented below.
Users MdbClickhouseClusterUserArrayInput
// Version of the ClickHouse server software.
Version pulumi.StringPtrInput
// Configuration of the ZooKeeper subcluster. The structure is documented below.
Zookeeper MdbClickhouseClusterZookeeperPtrInput
}
func (MdbClickhouseClusterArgs) ElementType() reflect.Type {
return reflect.TypeOf((*mdbClickhouseClusterArgs)(nil)).Elem()
}
type MdbClickhouseClusterInput interface {
pulumi.Input
ToMdbClickhouseClusterOutput() MdbClickhouseClusterOutput
ToMdbClickhouseClusterOutputWithContext(ctx context.Context) MdbClickhouseClusterOutput
}
func (*MdbClickhouseCluster) ElementType() reflect.Type {
return reflect.TypeOf((**MdbClickhouseCluster)(nil)).Elem()
}
func (i *MdbClickhouseCluster) ToMdbClickhouseClusterOutput() MdbClickhouseClusterOutput {
return i.ToMdbClickhouseClusterOutputWithContext(context.Background())
}
func (i *MdbClickhouseCluster) ToMdbClickhouseClusterOutputWithContext(ctx context.Context) MdbClickhouseClusterOutput {
return pulumi.ToOutputWithContext(ctx, i).(MdbClickhouseClusterOutput)
}
// MdbClickhouseClusterArrayInput is an input type that accepts MdbClickhouseClusterArray and MdbClickhouseClusterArrayOutput values.
// You can construct a concrete instance of `MdbClickhouseClusterArrayInput` via:
//
// MdbClickhouseClusterArray{ MdbClickhouseClusterArgs{...} }
type MdbClickhouseClusterArrayInput interface {
pulumi.Input
ToMdbClickhouseClusterArrayOutput() MdbClickhouseClusterArrayOutput
ToMdbClickhouseClusterArrayOutputWithContext(context.Context) MdbClickhouseClusterArrayOutput
}
type MdbClickhouseClusterArray []MdbClickhouseClusterInput
func (MdbClickhouseClusterArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*MdbClickhouseCluster)(nil)).Elem()
}
func (i MdbClickhouseClusterArray) ToMdbClickhouseClusterArrayOutput() MdbClickhouseClusterArrayOutput {
return i.ToMdbClickhouseClusterArrayOutputWithContext(context.Background())
}
func (i MdbClickhouseClusterArray) ToMdbClickhouseClusterArrayOutputWithContext(ctx context.Context) MdbClickhouseClusterArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(MdbClickhouseClusterArrayOutput)
}
// MdbClickhouseClusterMapInput is an input type that accepts MdbClickhouseClusterMap and MdbClickhouseClusterMapOutput values.
// You can construct a concrete instance of `MdbClickhouseClusterMapInput` via:
//
// MdbClickhouseClusterMap{ "key": MdbClickhouseClusterArgs{...} }
type MdbClickhouseClusterMapInput interface {
pulumi.Input
ToMdbClickhouseClusterMapOutput() MdbClickhouseClusterMapOutput
ToMdbClickhouseClusterMapOutputWithContext(context.Context) MdbClickhouseClusterMapOutput
}
type MdbClickhouseClusterMap map[string]MdbClickhouseClusterInput
func (MdbClickhouseClusterMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*MdbClickhouseCluster)(nil)).Elem()
}
func (i MdbClickhouseClusterMap) ToMdbClickhouseClusterMapOutput() MdbClickhouseClusterMapOutput {
return i.ToMdbClickhouseClusterMapOutputWithContext(context.Background())
}
func (i MdbClickhouseClusterMap) ToMdbClickhouseClusterMapOutputWithContext(ctx context.Context) MdbClickhouseClusterMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(MdbClickhouseClusterMapOutput)
}
type MdbClickhouseClusterOutput struct{ *pulumi.OutputState }
func (MdbClickhouseClusterOutput) ElementType() reflect.Type {
return reflect.TypeOf((**MdbClickhouseCluster)(nil)).Elem()
}
func (o MdbClickhouseClusterOutput) ToMdbClickhouseClusterOutput() MdbClickhouseClusterOutput {
return o
}
func (o MdbClickhouseClusterOutput) ToMdbClickhouseClusterOutputWithContext(ctx context.Context) MdbClickhouseClusterOutput {
return o
}
type MdbClickhouseClusterArrayOutput struct{ *pulumi.OutputState }
func (MdbClickhouseClusterArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*MdbClickhouseCluster)(nil)).Elem()
}
func (o MdbClickhouseClusterArrayOutput) ToMdbClickhouseClusterArrayOutput() MdbClickhouseClusterArrayOutput {
return o
}
func (o MdbClickhouseClusterArrayOutput) ToMdbClickhouseClusterArrayOutputWithContext(ctx context.Context) MdbClickhouseClusterArrayOutput {
return o
}
func (o MdbClickhouseClusterArrayOutput) Index(i pulumi.IntInput) MdbClickhouseClusterOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *MdbClickhouseCluster {
return vs[0].([]*MdbClickhouseCluster)[vs[1].(int)]
}).(MdbClickhouseClusterOutput)
}
type MdbClickhouseClusterMapOutput struct{ *pulumi.OutputState }
func (MdbClickhouseClusterMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*MdbClickhouseCluster)(nil)).Elem()
}
func (o MdbClickhouseClusterMapOutput) ToMdbClickhouseClusterMapOutput() MdbClickhouseClusterMapOutput {
return o
}
func (o MdbClickhouseClusterMapOutput) ToMdbClickhouseClusterMapOutputWithContext(ctx context.Context) MdbClickhouseClusterMapOutput {
return o
}
func (o MdbClickhouseClusterMapOutput) MapIndex(k pulumi.StringInput) MdbClickhouseClusterOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *MdbClickhouseCluster {
return vs[0].(map[string]*MdbClickhouseCluster)[vs[1].(string)]
}).(MdbClickhouseClusterOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*MdbClickhouseClusterInput)(nil)).Elem(), &MdbClickhouseCluster{})
pulumi.RegisterInputType(reflect.TypeOf((*MdbClickhouseClusterArrayInput)(nil)).Elem(), MdbClickhouseClusterArray{})
pulumi.RegisterInputType(reflect.TypeOf((*MdbClickhouseClusterMapInput)(nil)).Elem(), MdbClickhouseClusterMap{})
pulumi.RegisterOutputType(MdbClickhouseClusterOutput{})
pulumi.RegisterOutputType(MdbClickhouseClusterArrayOutput{})
pulumi.RegisterOutputType(MdbClickhouseClusterMapOutput{})
}