generated from hashicorp/terraform-provider-scaffolding
/
connector_singular_data_source_gen.go
813 lines (800 loc) · 30.9 KB
/
connector_singular_data_source_gen.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
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
// Code generated by generators/singular-data-source/main.go; DO NOT EDIT.
package kafkaconnect
import (
"context"
"github.com/hashicorp/terraform-plugin-framework/datasource"
"github.com/hashicorp/terraform-plugin-framework/datasource/schema"
"github.com/hashicorp/terraform-plugin-framework/types"
"github.com/hashicorp/terraform-provider-awscc/internal/generic"
"github.com/hashicorp/terraform-provider-awscc/internal/registry"
)
func init() {
registry.AddDataSourceFactory("awscc_kafkaconnect_connector", connectorDataSource)
}
// connectorDataSource returns the Terraform awscc_kafkaconnect_connector data source.
// This Terraform data source corresponds to the CloudFormation AWS::KafkaConnect::Connector resource.
func connectorDataSource(ctx context.Context) (datasource.DataSource, error) {
attributes := map[string]schema.Attribute{ /*START SCHEMA*/
// Property: Capacity
// CloudFormation resource type schema:
//
// {
// "additionalProperties": false,
// "description": "Information about the capacity allocated to the connector.",
// "oneOf": [
// {
// "required": [
// "AutoScaling"
// ]
// },
// {
// "required": [
// "ProvisionedCapacity"
// ]
// }
// ],
// "properties": {
// "AutoScaling": {
// "additionalProperties": false,
// "description": "Details about auto scaling of a connector.",
// "properties": {
// "MaxWorkerCount": {
// "description": "The maximum number of workers for a connector.",
// "type": "integer"
// },
// "McuCount": {
// "description": "Specifies how many MSK Connect Units (MCU) as the minimum scaling unit.",
// "enum": [
// 1,
// 2,
// 4,
// 8
// ],
// "type": "integer"
// },
// "MinWorkerCount": {
// "description": "The minimum number of workers for a connector.",
// "type": "integer"
// },
// "ScaleInPolicy": {
// "additionalProperties": false,
// "description": "Information about the scale in policy of the connector.",
// "properties": {
// "CpuUtilizationPercentage": {
// "description": "Specifies the CPU utilization percentage threshold at which connector scale in should trigger.",
// "maximum": 100,
// "minimum": 1,
// "type": "integer"
// }
// },
// "required": [
// "CpuUtilizationPercentage"
// ],
// "type": "object"
// },
// "ScaleOutPolicy": {
// "additionalProperties": false,
// "description": "Information about the scale out policy of the connector.",
// "properties": {
// "CpuUtilizationPercentage": {
// "description": "Specifies the CPU utilization percentage threshold at which connector scale out should trigger.",
// "maximum": 100,
// "minimum": 1,
// "type": "integer"
// }
// },
// "required": [
// "CpuUtilizationPercentage"
// ],
// "type": "object"
// }
// },
// "required": [
// "MaxWorkerCount",
// "MinWorkerCount",
// "ScaleInPolicy",
// "ScaleOutPolicy",
// "McuCount"
// ],
// "type": "object"
// },
// "ProvisionedCapacity": {
// "additionalProperties": false,
// "description": "Details about a fixed capacity allocated to a connector.",
// "properties": {
// "McuCount": {
// "description": "Specifies how many MSK Connect Units (MCU) are allocated to the connector.",
// "enum": [
// 1,
// 2,
// 4,
// 8
// ],
// "type": "integer"
// },
// "WorkerCount": {
// "description": "Number of workers for a connector.",
// "type": "integer"
// }
// },
// "required": [
// "WorkerCount"
// ],
// "type": "object"
// }
// },
// "type": "object"
// }
"capacity": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/
Attributes: map[string]schema.Attribute{ /*START SCHEMA*/
// Property: AutoScaling
"auto_scaling": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/
Attributes: map[string]schema.Attribute{ /*START SCHEMA*/
// Property: MaxWorkerCount
"max_worker_count": schema.Int64Attribute{ /*START ATTRIBUTE*/
Description: "The maximum number of workers for a connector.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: McuCount
"mcu_count": schema.Int64Attribute{ /*START ATTRIBUTE*/
Description: "Specifies how many MSK Connect Units (MCU) as the minimum scaling unit.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: MinWorkerCount
"min_worker_count": schema.Int64Attribute{ /*START ATTRIBUTE*/
Description: "The minimum number of workers for a connector.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: ScaleInPolicy
"scale_in_policy": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/
Attributes: map[string]schema.Attribute{ /*START SCHEMA*/
// Property: CpuUtilizationPercentage
"cpu_utilization_percentage": schema.Int64Attribute{ /*START ATTRIBUTE*/
Description: "Specifies the CPU utilization percentage threshold at which connector scale in should trigger.",
Computed: true,
}, /*END ATTRIBUTE*/
}, /*END SCHEMA*/
Description: "Information about the scale in policy of the connector.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: ScaleOutPolicy
"scale_out_policy": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/
Attributes: map[string]schema.Attribute{ /*START SCHEMA*/
// Property: CpuUtilizationPercentage
"cpu_utilization_percentage": schema.Int64Attribute{ /*START ATTRIBUTE*/
Description: "Specifies the CPU utilization percentage threshold at which connector scale out should trigger.",
Computed: true,
}, /*END ATTRIBUTE*/
}, /*END SCHEMA*/
Description: "Information about the scale out policy of the connector.",
Computed: true,
}, /*END ATTRIBUTE*/
}, /*END SCHEMA*/
Description: "Details about auto scaling of a connector.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: ProvisionedCapacity
"provisioned_capacity": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/
Attributes: map[string]schema.Attribute{ /*START SCHEMA*/
// Property: McuCount
"mcu_count": schema.Int64Attribute{ /*START ATTRIBUTE*/
Description: "Specifies how many MSK Connect Units (MCU) are allocated to the connector.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: WorkerCount
"worker_count": schema.Int64Attribute{ /*START ATTRIBUTE*/
Description: "Number of workers for a connector.",
Computed: true,
}, /*END ATTRIBUTE*/
}, /*END SCHEMA*/
Description: "Details about a fixed capacity allocated to a connector.",
Computed: true,
}, /*END ATTRIBUTE*/
}, /*END SCHEMA*/
Description: "Information about the capacity allocated to the connector.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: ConnectorArn
// CloudFormation resource type schema:
//
// {
// "description": "Amazon Resource Name for the created Connector.",
// "pattern": "arn:(aws|aws-us-gov|aws-cn):kafkaconnect:.*",
// "type": "string"
// }
"connector_arn": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "Amazon Resource Name for the created Connector.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: ConnectorConfiguration
// CloudFormation resource type schema:
//
// {
// "additionalProperties": false,
// "description": "The configuration for the connector.",
// "patternProperties": {
// "": {
// "type": "string"
// }
// },
// "type": "object"
// }
"connector_configuration": // Pattern: ""
schema.MapAttribute{ /*START ATTRIBUTE*/
ElementType: types.StringType,
Description: "The configuration for the connector.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: ConnectorDescription
// CloudFormation resource type schema:
//
// {
// "description": "A summary description of the connector.",
// "maxLength": 1024,
// "type": "string"
// }
"connector_description": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "A summary description of the connector.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: ConnectorName
// CloudFormation resource type schema:
//
// {
// "description": "The name of the connector.",
// "maxLength": 128,
// "minLength": 1,
// "type": "string"
// }
"connector_name": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The name of the connector.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: KafkaCluster
// CloudFormation resource type schema:
//
// {
// "additionalProperties": false,
// "description": "Details of how to connect to the Kafka cluster.",
// "properties": {
// "ApacheKafkaCluster": {
// "additionalProperties": false,
// "description": "Details of how to connect to an Apache Kafka cluster.",
// "properties": {
// "BootstrapServers": {
// "description": "The bootstrap servers string of the Apache Kafka cluster.",
// "type": "string"
// },
// "Vpc": {
// "additionalProperties": false,
// "description": "Information about a VPC used with the connector.",
// "properties": {
// "SecurityGroups": {
// "description": "The AWS security groups to associate with the elastic network interfaces in order to specify what the connector has access to.",
// "insertionOrder": false,
// "items": {
// "type": "string"
// },
// "type": "array",
// "uniqueItems": true
// },
// "Subnets": {
// "description": "The list of subnets to connect to in the virtual private cloud (VPC). AWS creates elastic network interfaces inside these subnets.",
// "insertionOrder": false,
// "items": {
// "type": "string"
// },
// "minItems": 1,
// "type": "array",
// "uniqueItems": true
// }
// },
// "required": [
// "SecurityGroups",
// "Subnets"
// ],
// "type": "object"
// }
// },
// "required": [
// "BootstrapServers",
// "Vpc"
// ],
// "type": "object"
// }
// },
// "required": [
// "ApacheKafkaCluster"
// ],
// "type": "object"
// }
"kafka_cluster": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/
Attributes: map[string]schema.Attribute{ /*START SCHEMA*/
// Property: ApacheKafkaCluster
"apache_kafka_cluster": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/
Attributes: map[string]schema.Attribute{ /*START SCHEMA*/
// Property: BootstrapServers
"bootstrap_servers": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The bootstrap servers string of the Apache Kafka cluster.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: Vpc
"vpc": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/
Attributes: map[string]schema.Attribute{ /*START SCHEMA*/
// Property: SecurityGroups
"security_groups": schema.SetAttribute{ /*START ATTRIBUTE*/
ElementType: types.StringType,
Description: "The AWS security groups to associate with the elastic network interfaces in order to specify what the connector has access to.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: Subnets
"subnets": schema.SetAttribute{ /*START ATTRIBUTE*/
ElementType: types.StringType,
Description: "The list of subnets to connect to in the virtual private cloud (VPC). AWS creates elastic network interfaces inside these subnets.",
Computed: true,
}, /*END ATTRIBUTE*/
}, /*END SCHEMA*/
Description: "Information about a VPC used with the connector.",
Computed: true,
}, /*END ATTRIBUTE*/
}, /*END SCHEMA*/
Description: "Details of how to connect to an Apache Kafka cluster.",
Computed: true,
}, /*END ATTRIBUTE*/
}, /*END SCHEMA*/
Description: "Details of how to connect to the Kafka cluster.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: KafkaClusterClientAuthentication
// CloudFormation resource type schema:
//
// {
// "additionalProperties": false,
// "description": "Details of the client authentication used by the Kafka cluster.",
// "properties": {
// "AuthenticationType": {
// "description": "The type of client authentication used to connect to the Kafka cluster. Value NONE means that no client authentication is used.",
// "enum": [
// "NONE",
// "IAM"
// ],
// "type": "string"
// }
// },
// "required": [
// "AuthenticationType"
// ],
// "type": "object"
// }
"kafka_cluster_client_authentication": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/
Attributes: map[string]schema.Attribute{ /*START SCHEMA*/
// Property: AuthenticationType
"authentication_type": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The type of client authentication used to connect to the Kafka cluster. Value NONE means that no client authentication is used.",
Computed: true,
}, /*END ATTRIBUTE*/
}, /*END SCHEMA*/
Description: "Details of the client authentication used by the Kafka cluster.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: KafkaClusterEncryptionInTransit
// CloudFormation resource type schema:
//
// {
// "additionalProperties": false,
// "description": "Details of encryption in transit to the Kafka cluster.",
// "properties": {
// "EncryptionType": {
// "description": "The type of encryption in transit to the Kafka cluster.",
// "enum": [
// "PLAINTEXT",
// "TLS"
// ],
// "type": "string"
// }
// },
// "required": [
// "EncryptionType"
// ],
// "type": "object"
// }
"kafka_cluster_encryption_in_transit": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/
Attributes: map[string]schema.Attribute{ /*START SCHEMA*/
// Property: EncryptionType
"encryption_type": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The type of encryption in transit to the Kafka cluster.",
Computed: true,
}, /*END ATTRIBUTE*/
}, /*END SCHEMA*/
Description: "Details of encryption in transit to the Kafka cluster.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: KafkaConnectVersion
// CloudFormation resource type schema:
//
// {
// "description": "The version of Kafka Connect. It has to be compatible with both the Kafka cluster's version and the plugins.",
// "type": "string"
// }
"kafka_connect_version": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The version of Kafka Connect. It has to be compatible with both the Kafka cluster's version and the plugins.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: LogDelivery
// CloudFormation resource type schema:
//
// {
// "additionalProperties": false,
// "description": "Details of what logs are delivered and where they are delivered.",
// "properties": {
// "WorkerLogDelivery": {
// "additionalProperties": false,
// "description": "Specifies where worker logs are delivered.",
// "properties": {
// "CloudWatchLogs": {
// "additionalProperties": false,
// "description": "Details about delivering logs to Amazon CloudWatch Logs.",
// "properties": {
// "Enabled": {
// "description": "Specifies whether the logs get sent to the specified CloudWatch Logs destination.",
// "type": "boolean"
// },
// "LogGroup": {
// "description": "The CloudWatch log group that is the destination for log delivery.",
// "type": "string"
// }
// },
// "required": [
// "Enabled"
// ],
// "type": "object"
// },
// "Firehose": {
// "additionalProperties": false,
// "description": "Details about delivering logs to Amazon Kinesis Data Firehose.",
// "properties": {
// "DeliveryStream": {
// "description": "The Kinesis Data Firehose delivery stream that is the destination for log delivery.",
// "type": "string"
// },
// "Enabled": {
// "description": "Specifies whether the logs get sent to the specified Kinesis Data Firehose delivery stream.",
// "type": "boolean"
// }
// },
// "required": [
// "Enabled"
// ],
// "type": "object"
// },
// "S3": {
// "additionalProperties": false,
// "description": "Details about delivering logs to Amazon S3.",
// "properties": {
// "Bucket": {
// "description": "The name of the S3 bucket that is the destination for log delivery.",
// "type": "string"
// },
// "Enabled": {
// "description": "Specifies whether the logs get sent to the specified Amazon S3 destination.",
// "type": "boolean"
// },
// "Prefix": {
// "description": "The S3 prefix that is the destination for log delivery.",
// "type": "string"
// }
// },
// "required": [
// "Enabled"
// ],
// "type": "object"
// }
// },
// "type": "object"
// }
// },
// "required": [
// "WorkerLogDelivery"
// ],
// "type": "object"
// }
"log_delivery": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/
Attributes: map[string]schema.Attribute{ /*START SCHEMA*/
// Property: WorkerLogDelivery
"worker_log_delivery": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/
Attributes: map[string]schema.Attribute{ /*START SCHEMA*/
// Property: CloudWatchLogs
"cloudwatch_logs": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/
Attributes: map[string]schema.Attribute{ /*START SCHEMA*/
// Property: Enabled
"enabled": schema.BoolAttribute{ /*START ATTRIBUTE*/
Description: "Specifies whether the logs get sent to the specified CloudWatch Logs destination.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: LogGroup
"log_group": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The CloudWatch log group that is the destination for log delivery.",
Computed: true,
}, /*END ATTRIBUTE*/
}, /*END SCHEMA*/
Description: "Details about delivering logs to Amazon CloudWatch Logs.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: Firehose
"firehose": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/
Attributes: map[string]schema.Attribute{ /*START SCHEMA*/
// Property: DeliveryStream
"delivery_stream": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The Kinesis Data Firehose delivery stream that is the destination for log delivery.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: Enabled
"enabled": schema.BoolAttribute{ /*START ATTRIBUTE*/
Description: "Specifies whether the logs get sent to the specified Kinesis Data Firehose delivery stream.",
Computed: true,
}, /*END ATTRIBUTE*/
}, /*END SCHEMA*/
Description: "Details about delivering logs to Amazon Kinesis Data Firehose.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: S3
"s3": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/
Attributes: map[string]schema.Attribute{ /*START SCHEMA*/
// Property: Bucket
"bucket": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The name of the S3 bucket that is the destination for log delivery.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: Enabled
"enabled": schema.BoolAttribute{ /*START ATTRIBUTE*/
Description: "Specifies whether the logs get sent to the specified Amazon S3 destination.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: Prefix
"prefix": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The S3 prefix that is the destination for log delivery.",
Computed: true,
}, /*END ATTRIBUTE*/
}, /*END SCHEMA*/
Description: "Details about delivering logs to Amazon S3.",
Computed: true,
}, /*END ATTRIBUTE*/
}, /*END SCHEMA*/
Description: "Specifies where worker logs are delivered.",
Computed: true,
}, /*END ATTRIBUTE*/
}, /*END SCHEMA*/
Description: "Details of what logs are delivered and where they are delivered.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: Plugins
// CloudFormation resource type schema:
//
// {
// "description": "List of plugins to use with the connector.",
// "insertionOrder": false,
// "items": {
// "additionalProperties": false,
// "description": "Details about a Kafka Connect plugin which will be used with the connector.",
// "properties": {
// "CustomPlugin": {
// "additionalProperties": false,
// "description": "Details about a custom plugin.",
// "properties": {
// "CustomPluginArn": {
// "description": "The Amazon Resource Name (ARN) of the custom plugin to use.",
// "pattern": "arn:(aws|aws-us-gov|aws-cn):kafkaconnect:.*",
// "type": "string"
// },
// "Revision": {
// "description": "The revision of the custom plugin to use.",
// "format": "int64",
// "minimum": 1,
// "type": "integer"
// }
// },
// "required": [
// "CustomPluginArn",
// "Revision"
// ],
// "type": "object"
// }
// },
// "required": [
// "CustomPlugin"
// ],
// "type": "object"
// },
// "minItems": 1,
// "type": "array",
// "uniqueItems": true
// }
"plugins": schema.SetNestedAttribute{ /*START ATTRIBUTE*/
NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/
Attributes: map[string]schema.Attribute{ /*START SCHEMA*/
// Property: CustomPlugin
"custom_plugin": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/
Attributes: map[string]schema.Attribute{ /*START SCHEMA*/
// Property: CustomPluginArn
"custom_plugin_arn": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The Amazon Resource Name (ARN) of the custom plugin to use.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: Revision
"revision": schema.Int64Attribute{ /*START ATTRIBUTE*/
Description: "The revision of the custom plugin to use.",
Computed: true,
}, /*END ATTRIBUTE*/
}, /*END SCHEMA*/
Description: "Details about a custom plugin.",
Computed: true,
}, /*END ATTRIBUTE*/
}, /*END SCHEMA*/
}, /*END NESTED OBJECT*/
Description: "List of plugins to use with the connector.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: ServiceExecutionRoleArn
// CloudFormation resource type schema:
//
// {
// "description": "The Amazon Resource Name (ARN) of the IAM role used by the connector to access Amazon S3 objects and other external resources.",
// "pattern": "arn:(aws|aws-us-gov|aws-cn):iam:.*",
// "type": "string"
// }
"service_execution_role_arn": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The Amazon Resource Name (ARN) of the IAM role used by the connector to access Amazon S3 objects and other external resources.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: Tags
// CloudFormation resource type schema:
//
// {
// "description": "A collection of tags associated with a resource",
// "insertionOrder": false,
// "items": {
// "additionalProperties": false,
// "properties": {
// "Key": {
// "maxLength": 128,
// "minLength": 1,
// "type": "string"
// },
// "Value": {
// "maxLength": 256,
// "type": "string"
// }
// },
// "required": [
// "Value",
// "Key"
// ],
// "type": "object"
// },
// "type": "array",
// "uniqueItems": true
// }
"tags": schema.SetNestedAttribute{ /*START ATTRIBUTE*/
NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/
Attributes: map[string]schema.Attribute{ /*START SCHEMA*/
// Property: Key
"key": schema.StringAttribute{ /*START ATTRIBUTE*/
Computed: true,
}, /*END ATTRIBUTE*/
// Property: Value
"value": schema.StringAttribute{ /*START ATTRIBUTE*/
Computed: true,
}, /*END ATTRIBUTE*/
}, /*END SCHEMA*/
}, /*END NESTED OBJECT*/
Description: "A collection of tags associated with a resource",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: WorkerConfiguration
// CloudFormation resource type schema:
//
// {
// "additionalProperties": false,
// "description": "Specifies the worker configuration to use with the connector.",
// "properties": {
// "Revision": {
// "description": "The revision of the worker configuration to use.",
// "format": "int64",
// "minimum": 1,
// "type": "integer"
// },
// "WorkerConfigurationArn": {
// "description": "The Amazon Resource Name (ARN) of the worker configuration to use.",
// "pattern": "arn:(aws|aws-us-gov|aws-cn):kafkaconnect:.*",
// "type": "string"
// }
// },
// "required": [
// "Revision",
// "WorkerConfigurationArn"
// ],
// "type": "object"
// }
"worker_configuration": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/
Attributes: map[string]schema.Attribute{ /*START SCHEMA*/
// Property: Revision
"revision": schema.Int64Attribute{ /*START ATTRIBUTE*/
Description: "The revision of the worker configuration to use.",
Computed: true,
}, /*END ATTRIBUTE*/
// Property: WorkerConfigurationArn
"worker_configuration_arn": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The Amazon Resource Name (ARN) of the worker configuration to use.",
Computed: true,
}, /*END ATTRIBUTE*/
}, /*END SCHEMA*/
Description: "Specifies the worker configuration to use with the connector.",
Computed: true,
}, /*END ATTRIBUTE*/
} /*END SCHEMA*/
attributes["id"] = schema.StringAttribute{
Description: "Uniquely identifies the resource.",
Required: true,
}
schema := schema.Schema{
Description: "Data Source schema for AWS::KafkaConnect::Connector",
Attributes: attributes,
}
var opts generic.DataSourceOptions
opts = opts.WithCloudFormationTypeName("AWS::KafkaConnect::Connector").WithTerraformTypeName("awscc_kafkaconnect_connector")
opts = opts.WithTerraformSchema(schema)
opts = opts.WithAttributeNameMap(map[string]string{
"apache_kafka_cluster": "ApacheKafkaCluster",
"authentication_type": "AuthenticationType",
"auto_scaling": "AutoScaling",
"bootstrap_servers": "BootstrapServers",
"bucket": "Bucket",
"capacity": "Capacity",
"cloudwatch_logs": "CloudWatchLogs",
"connector_arn": "ConnectorArn",
"connector_configuration": "ConnectorConfiguration",
"connector_description": "ConnectorDescription",
"connector_name": "ConnectorName",
"cpu_utilization_percentage": "CpuUtilizationPercentage",
"custom_plugin": "CustomPlugin",
"custom_plugin_arn": "CustomPluginArn",
"delivery_stream": "DeliveryStream",
"enabled": "Enabled",
"encryption_type": "EncryptionType",
"firehose": "Firehose",
"kafka_cluster": "KafkaCluster",
"kafka_cluster_client_authentication": "KafkaClusterClientAuthentication",
"kafka_cluster_encryption_in_transit": "KafkaClusterEncryptionInTransit",
"kafka_connect_version": "KafkaConnectVersion",
"key": "Key",
"log_delivery": "LogDelivery",
"log_group": "LogGroup",
"max_worker_count": "MaxWorkerCount",
"mcu_count": "McuCount",
"min_worker_count": "MinWorkerCount",
"plugins": "Plugins",
"prefix": "Prefix",
"provisioned_capacity": "ProvisionedCapacity",
"revision": "Revision",
"s3": "S3",
"scale_in_policy": "ScaleInPolicy",
"scale_out_policy": "ScaleOutPolicy",
"security_groups": "SecurityGroups",
"service_execution_role_arn": "ServiceExecutionRoleArn",
"subnets": "Subnets",
"tags": "Tags",
"value": "Value",
"vpc": "Vpc",
"worker_configuration": "WorkerConfiguration",
"worker_configuration_arn": "WorkerConfigurationArn",
"worker_count": "WorkerCount",
"worker_log_delivery": "WorkerLogDelivery",
})
v, err := generic.NewSingularDataSource(ctx, opts...)
if err != nil {
return nil, err
}
return v, nil
}