Skip to content

Commit ab38465

Browse files
author
hellertang
authored
remove ckafka valiadate (#983)
1 parent 353351c commit ab38465

File tree

4 files changed

+25
-31
lines changed

4 files changed

+25
-31
lines changed

tencentcloud/resource_tc_ckafka_instance.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,11 @@ func resourceTencentCloudCkafkaInstance() *schema.Resource {
138138
Description: "Kafka version (0.10.2/1.1.1/2.4.1).",
139139
},
140140
"band_width": {
141-
Type: schema.TypeInt,
142-
Optional: true,
143-
Computed: true,
144-
ForceNew: true,
145-
ValidateFunc: validateIntegerInRange(40, 1200),
146-
Description: "Instance bandwidth in MBps. interval:40-1200.",
141+
Type: schema.TypeInt,
142+
Optional: true,
143+
Computed: true,
144+
ForceNew: true,
145+
Description: "Instance bandwidth in MBps.",
147146
},
148147
"disk_size": {
149148
Type: schema.TypeInt,

tencentcloud/resource_tc_ckafka_topic.go

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -60,23 +60,20 @@ func resourceTencentCloudCkafkaTopic() *schema.Resource {
6060
Description: "Ckafka instance ID.",
6161
},
6262
"topic_name": {
63-
Type: schema.TypeString,
64-
Required: true,
65-
ForceNew: true,
66-
ValidateFunc: validateStringLengthInRange(1, 64),
67-
Description: "Name of the CKafka topic. It must start with a letter, the rest can contain letters, numbers and dashes(-). The length range is from 1 to 64.",
63+
Type: schema.TypeString,
64+
Required: true,
65+
ForceNew: true,
66+
Description: "Name of the CKafka topic. It must start with a letter, the rest can contain letters, numbers and dashes(-).",
6867
},
6968
"partition_num": {
70-
Type: schema.TypeInt,
71-
Required: true,
72-
ValidateFunc: validateIntegerInRange(1, 24),
73-
Description: "The number of partition.",
69+
Type: schema.TypeInt,
70+
Required: true,
71+
Description: "The number of partition.",
7472
},
7573
"replica_num": {
76-
Type: schema.TypeInt,
77-
Required: true,
78-
ValidateFunc: validateIntegerInRange(1, 3),
79-
Description: "The number of replica, the maximum is 3.",
74+
Type: schema.TypeInt,
75+
Required: true,
76+
Description: "The number of replica.",
8077
},
8178
"enable_white_list": {
8279
Type: schema.TypeBool,
@@ -91,10 +88,9 @@ func resourceTencentCloudCkafkaTopic() *schema.Resource {
9188
Elem: &schema.Schema{Type: schema.TypeString},
9289
},
9390
"note": {
94-
Type: schema.TypeString,
95-
Optional: true,
96-
ValidateFunc: validateStringLengthInRange(0, 64),
97-
Description: "The subject note is a string of no more than 64 characters. It must start with a letter, and the remaining part can contain letters, numbers and dashes (-).",
91+
Type: schema.TypeString,
92+
Optional: true,
93+
Description: "The subject note. It must start with a letter, and the remaining part can contain letters, numbers and dashes (-).",
9894
},
9995
"retention": {
10096
Type: schema.TypeInt,
@@ -122,10 +118,9 @@ func resourceTencentCloudCkafkaTopic() *schema.Resource {
122118
Description: "Whether to allow unsynchronized replicas to be selected as leader, default is `false`, `true: `allowed, `false`: not allowed.",
123119
},
124120
"max_message_bytes": {
125-
Type: schema.TypeInt,
126-
Optional: true,
127-
ValidateFunc: validateIntegerInRange(0, 8388608),
128-
Description: "Max message bytes.",
121+
Type: schema.TypeInt,
122+
Optional: true,
123+
Description: "Max message bytes.",
129124
},
130125
"segment": {
131126
Type: schema.TypeInt,

website/docs/r/ckafka_instance.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ The following arguments are supported:
5959
* `subnet_id` - (Required, ForceNew) Subnet id.
6060
* `vpc_id` - (Required, ForceNew) Vpc id.
6161
* `zone_id` - (Required, ForceNew) Available zone id.
62-
* `band_width` - (Optional, ForceNew) Instance bandwidth in MBps. interval:40-1200.
62+
* `band_width` - (Optional, ForceNew) Instance bandwidth in MBps.
6363
* `config` - (Optional) Instance configuration.
6464
* `disk_size` - (Optional, ForceNew) Disk Size. Its interval varies with bandwidth, and the input must be within the interval, which can be viewed through the control. If it is not within the interval, the plan will cause a change when first created.
6565
* `disk_type` - (Optional, ForceNew) Type of disk.

website/docs/r/ckafka_topic.html.markdown

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ The following arguments are supported:
3737

3838
* `instance_id` - (Required, ForceNew) Ckafka instance ID.
3939
* `partition_num` - (Required) The number of partition.
40-
* `replica_num` - (Required) The number of replica, the maximum is 3.
41-
* `topic_name` - (Required, ForceNew) Name of the CKafka topic. It must start with a letter, the rest can contain letters, numbers and dashes(-). The length range is from 1 to 64.
40+
* `replica_num` - (Required) The number of replica.
41+
* `topic_name` - (Required, ForceNew) Name of the CKafka topic. It must start with a letter, the rest can contain letters, numbers and dashes(-).
4242
* `clean_up_policy` - (Optional) Clear log policy, log clear mode, default is `delete`. `delete`: logs are deleted according to the storage time. `compact`: logs are compressed according to the key. `compact, delete`: logs are compressed according to the key and will be deleted according to the storage time.
4343
* `enable_white_list` - (Optional) Whether to open the ip whitelist, `true`: open, `false`: close.
4444
* `ip_white_list` - (Optional) Ip whitelist, quota limit, required when enableWhileList=true.
4545
* `max_message_bytes` - (Optional) Max message bytes.
46-
* `note` - (Optional) The subject note is a string of no more than 64 characters. It must start with a letter, and the remaining part can contain letters, numbers and dashes (-).
46+
* `note` - (Optional) The subject note. It must start with a letter, and the remaining part can contain letters, numbers and dashes (-).
4747
* `retention` - (Optional) Message can be selected. Retention time, unit is ms, the current minimum value is 60000ms.
4848
* `segment` - (Optional) Segment scrolling time, in ms, the current minimum is 3600000ms.
4949
* `sync_replica_min_num` - (Optional) Min number of sync replicas, Default is `1`.

0 commit comments

Comments
 (0)