Skip to content

Commit 27f0583

Browse files
Add missed fields attrs for kafka (#70)
1 parent 8b1a1ae commit 27f0583

2 files changed

Lines changed: 11 additions & 6 deletions

File tree

docs/data-sources/kafka.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,15 @@ Kafka data source
2121

2222
### Optional
2323

24-
- `cloud_type` (String) Cloud provider (`aws`, `gcp`, or `azure`)
2524
- `connection_info` (Attributes) Public connection info (see [below for nested schema](#nestedatt--connection_info))
26-
- `description` (String) Cluster description
2725
- `id` (String) Cluster ID
2826
- `name` (String) Cluster name
2927
- `private_connection_info` (Attributes) Private connection info (see [below for nested schema](#nestedatt--private_connection_info))
28+
29+
### Read-Only
30+
31+
- `cloud_type` (String) Cloud provider (`aws`, `gcp`, or `azure`)
32+
- `description` (String) Cluster description
3033
- `region_id` (String) Region where the cluster is located
3134
- `version` (String) Version of the ClickHouse DBMS
3235

internal/provider/kafka_data_source.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,27 +82,29 @@ func (d *KafkaDataSource) Schema(ctx context.Context, req datasource.SchemaReque
8282
MarkdownDescription: "Cluster name",
8383
},
8484
"description": schema.StringAttribute{
85-
Optional: true,
85+
Computed: true,
8686
MarkdownDescription: "Cluster description",
8787
},
8888
"region_id": schema.StringAttribute{
89-
Optional: true,
89+
Computed: true,
9090
MarkdownDescription: "Region where the cluster is located",
9191
},
9292
"cloud_type": schema.StringAttribute{
93-
Optional: true,
93+
Computed: true,
9494
MarkdownDescription: "Cloud provider (`aws`, `gcp`, or `azure`)",
9595
},
9696
"version": schema.StringAttribute{
97-
Optional: true,
97+
Computed: true,
9898
MarkdownDescription: "Version of the ClickHouse DBMS",
9999
},
100100
"connection_info": schema.SingleNestedAttribute{
101+
Computed: true,
101102
Optional: true,
102103
Attributes: kafkaConnectionInfoSchema(),
103104
MarkdownDescription: "Public connection info",
104105
},
105106
"private_connection_info": schema.SingleNestedAttribute{
107+
Computed: true,
106108
Optional: true,
107109
Attributes: kafkaConnectionInfoSchema(),
108110
MarkdownDescription: "Private connection info",

0 commit comments

Comments
 (0)