From 91421ffa5f3d888446ebb66527c3208eb84d38ba Mon Sep 17 00:00:00 2001
From: SevenEarth <391613297@qq.com>
Date: Tue, 10 Jun 2025 16:15:48 +0800
Subject: [PATCH 1/2] add

---
 .../ckafka/resource_tc_ckafka_instance.go     |   4 +-
 .../ckafka/resource_tc_ckafka_instance.md     | 149 +++++++++---------
 website/docs/r/ckafka_instance.html.markdown  | 147 +++++++++--------
 3 files changed, 146 insertions(+), 154 deletions(-)

diff --git a/tencentcloud/services/ckafka/resource_tc_ckafka_instance.go b/tencentcloud/services/ckafka/resource_tc_ckafka_instance.go
index 64f7cb938e..8390f515ec 100644
--- a/tencentcloud/services/ckafka/resource_tc_ckafka_instance.go
+++ b/tencentcloud/services/ckafka/resource_tc_ckafka_instance.go
@@ -55,8 +55,8 @@ func ResourceTencentCloudCkafkaInstance() *schema.Resource {
 				Type:         schema.TypeString,
 				Optional:     true,
 				Default:      "profession",
-				ValidateFunc: tccommon.ValidateAllowedStringValue([]string{"standard", "profession"}),
-				Description:  "Specifications type of instance. Allowed values are `standard`, `profession`. Default is `profession`.",
+				ValidateFunc: tccommon.ValidateAllowedStringValue([]string{"standard", "profession", "premium"}),
+				Description:  "Specifications type of instance. Allowed values are `profession`, `premium`. Default is `profession`.",
 			},
 			"charge_type": {
 				Type:         schema.TypeString,
diff --git a/tencentcloud/services/ckafka/resource_tc_ckafka_instance.md b/tencentcloud/services/ckafka/resource_tc_ckafka_instance.md
index 7f7988ce4e..622350aa75 100644
--- a/tencentcloud/services/ckafka/resource_tc_ckafka_instance.md
+++ b/tencentcloud/services/ckafka/resource_tc_ckafka_instance.md
@@ -1,62 +1,46 @@
-Use this resource to create ckafka instance.
+Use this resource to create CKafka instance.
 
 Example Usage
 
-Basic Instance
-```hcl
-variable "vpc_id" {
-  default = "vpc-68vi2d3h"
-}
-
-variable "subnet_id" {
-  default = "subnet-ob6clqwk"
-}
+Create basic instance(prepaid)
 
+```hcl
 data "tencentcloud_availability_zones_by_product" "gz" {
-  name    = "ap-guangzhou-3"
+  name    = "ap-guangzhou-6"
   product = "ckafka"
 }
 
-resource "tencentcloud_ckafka_instance" "kafka_instance_prepaid" {
-  instance_name      = "ckafka-instance-prepaid"
-  zone_id            = data.tencentcloud_availability_zones_by_product.gz.zones.0.id
-  period             = 1
-  vpc_id             = var.vpc_id
-  subnet_id          = var.subnet_id
-  msg_retention_time = 1300
-  renew_flag         = 0
-  kafka_version      = "2.4.1"
-  disk_size          = 200
-  disk_type          = "CLOUD_BASIC"
-  band_width = 20
-  partition = 400
-
-  specifications_type = "standard"
-  instance_type       = 2
-
-  config {
-    auto_create_topic_enable   = true
-    default_num_partitions     = 3
-    default_replication_factor = 3
-  }
+# create vpc
+resource "tencentcloud_vpc" "vpc" {
+  name       = "vpc"
+  cidr_block = "10.0.0.0/16"
+}
 
-  dynamic_retention_config {
-    enable = 1
-  }
+# create vpc subnet
+resource "tencentcloud_subnet" "subnet" {
+  name              = "subnet"
+  vpc_id            = tencentcloud_vpc.vpc.id
+  availability_zone = "ap-guangzhou-6"
+  cidr_block        = "10.0.20.0/28"
+  is_multicast      = false
 }
 
-resource "tencentcloud_ckafka_instance" "kafka_instance_postpaid" {
-  instance_name      = "ckafka-instance-postpaid"
-  zone_id            = data.tencentcloud_availability_zones_by_product.gz.zones.0.id
-  vpc_id             = var.vpc_id
-  subnet_id          = var.subnet_id
-  msg_retention_time = 1300
-  kafka_version      = "1.1.1"
-  disk_size          = 200
-  band_width         = 20
-  disk_type          = "CLOUD_BASIC"
-  partition          = 400
-  charge_type        = "POSTPAID_BY_HOUR"
+# create ckafka
+resource "tencentcloud_ckafka_instance" "example" {
+  instance_name       = "tf-example"
+  zone_id             = data.tencentcloud_availability_zones_by_product.gz.zones.0.id
+  period              = 1
+  vpc_id              = tencentcloud_vpc.vpc.id
+  subnet_id           = tencentcloud_subnet.subnet.id
+  msg_retention_time  = 1300
+  renew_flag          = 0
+  kafka_version       = "2.8.1"
+  disk_size           = 200
+  disk_type           = "CLOUD_BASIC"
+  band_width          = 40
+  partition           = 400
+  specifications_type = "profession"
+  instance_type       = 1
 
   config {
     auto_create_topic_enable   = true
@@ -70,42 +54,55 @@ resource "tencentcloud_ckafka_instance" "kafka_instance_postpaid" {
 }
 ```
 
-Multi zone Instance
+Create multi zone instance(postpaid)
+
 ```hcl
-variable "vpc_id" {
-  default = "vpc-68vi2d3h"
+data "tencentcloud_availability_zones_by_product" "gz6" {
+  name    = "ap-guangzhou-6"
+  product = "ckafka"
 }
 
-variable "subnet_id" {
-  default = "subnet-ob6clqwk"
+data "tencentcloud_availability_zones_by_product" "gz7" {
+  name    = "ap-guangzhou-7"
+  product = "ckafka"
 }
 
-data "tencentcloud_availability_zones_by_product" "gz3" {
-  name    = "ap-guangzhou-3"
-  product = "ckafka"
+# create vpc
+resource "tencentcloud_vpc" "vpc" {
+  name       = "vpc"
+  cidr_block = "10.0.0.0/16"
 }
 
-data "tencentcloud_availability_zones_by_product" "gz6" {
-  name    = "ap-guangzhou-6"
-  product = "ckafka"
+# create vpc subnet
+resource "tencentcloud_subnet" "subnet" {
+  name              = "subnet"
+  vpc_id            = tencentcloud_vpc.vpc.id
+  availability_zone = "ap-guangzhou-6"
+  cidr_block        = "10.0.20.0/28"
+  is_multicast      = false
 }
 
-resource "tencentcloud_ckafka_instance" "kafka_instance" {
-  instance_name   = "ckafka-instance-maz-tf-test"
-  zone_id         = data.tencentcloud_availability_zones_by_product.gz3.zones.0.id
+# create ckafka
+resource "tencentcloud_ckafka_instance" "example" {
+  instance_name   = "tf-example"
+  zone_id         = data.tencentcloud_availability_zones_by_product.gz6.zones.0.id
   multi_zone_flag = true
-  zone_ids        = [
-    data.tencentcloud_availability_zones_by_product.gz3.zones.0.id,
-    data.tencentcloud_availability_zones_by_product.gz6.zones.0.id
+  zone_ids = [
+    data.tencentcloud_availability_zones_by_product.gz6.zones.0.id,
+    data.tencentcloud_availability_zones_by_product.gz7.zones.0.id,
   ]
-  period             = 1
-  vpc_id             = var.vpc_id
-  subnet_id          = var.subnet_id
-  msg_retention_time = 1300
-  renew_flag         = 0
-  kafka_version      = "1.1.1"
-  disk_size          = 500
-  disk_type          = "CLOUD_BASIC"
+  renew_flag          = 0
+  vpc_id              = tencentcloud_vpc.vpc.id
+  subnet_id           = tencentcloud_subnet.subnet.id
+  msg_retention_time  = 4320
+  kafka_version       = "2.8.1"
+  disk_size           = 200
+  disk_type           = "CLOUD_BASIC"
+  band_width          = 20
+  partition           = 400
+  specifications_type = "profession"
+  charge_type         = "POSTPAID_BY_HOUR"
+  instance_type       = 1
 
   config {
     auto_create_topic_enable   = true
@@ -121,8 +118,8 @@ resource "tencentcloud_ckafka_instance" "kafka_instance" {
 
 Import
 
-ckafka instance can be imported using the instance_id, e.g.
+CKafka instance can be imported using the instanceId, e.g.
 
 ```
-$ terraform import tencentcloud_ckafka_instance.foo ckafka-f9ife4zz
-```
\ No newline at end of file
+$ terraform import tencentcloud_ckafka_instance.example ckafka-f9ife4zz
+```
diff --git a/website/docs/r/ckafka_instance.html.markdown b/website/docs/r/ckafka_instance.html.markdown
index 88fea0edf1..ab0faff67e 100644
--- a/website/docs/r/ckafka_instance.html.markdown
+++ b/website/docs/r/ckafka_instance.html.markdown
@@ -4,71 +4,54 @@ layout: "tencentcloud"
 page_title: "TencentCloud: tencentcloud_ckafka_instance"
 sidebar_current: "docs-tencentcloud-resource-ckafka_instance"
 description: |-
-  Use this resource to create ckafka instance.
+  Use this resource to create CKafka instance.
 ---
 
 # tencentcloud_ckafka_instance
 
-Use this resource to create ckafka instance.
+Use this resource to create CKafka instance.
 
 ## Example Usage
 
-### Basic Instance
+### Create basic instance(prepaid)
 
 ```hcl
-variable "vpc_id" {
-  default = "vpc-68vi2d3h"
-}
-
-variable "subnet_id" {
-  default = "subnet-ob6clqwk"
-}
-
 data "tencentcloud_availability_zones_by_product" "gz" {
-  name    = "ap-guangzhou-3"
+  name    = "ap-guangzhou-6"
   product = "ckafka"
 }
 
-resource "tencentcloud_ckafka_instance" "kafka_instance_prepaid" {
-  instance_name      = "ckafka-instance-prepaid"
-  zone_id            = data.tencentcloud_availability_zones_by_product.gz.zones.0.id
-  period             = 1
-  vpc_id             = var.vpc_id
-  subnet_id          = var.subnet_id
-  msg_retention_time = 1300
-  renew_flag         = 0
-  kafka_version      = "2.4.1"
-  disk_size          = 200
-  disk_type          = "CLOUD_BASIC"
-  band_width         = 20
-  partition          = 400
-
-  specifications_type = "standard"
-  instance_type       = 2
-
-  config {
-    auto_create_topic_enable   = true
-    default_num_partitions     = 3
-    default_replication_factor = 3
-  }
+# create vpc
+resource "tencentcloud_vpc" "vpc" {
+  name       = "vpc"
+  cidr_block = "10.0.0.0/16"
+}
 
-  dynamic_retention_config {
-    enable = 1
-  }
+# create vpc subnet
+resource "tencentcloud_subnet" "subnet" {
+  name              = "subnet"
+  vpc_id            = tencentcloud_vpc.vpc.id
+  availability_zone = "ap-guangzhou-6"
+  cidr_block        = "10.0.20.0/28"
+  is_multicast      = false
 }
 
-resource "tencentcloud_ckafka_instance" "kafka_instance_postpaid" {
-  instance_name      = "ckafka-instance-postpaid"
-  zone_id            = data.tencentcloud_availability_zones_by_product.gz.zones.0.id
-  vpc_id             = var.vpc_id
-  subnet_id          = var.subnet_id
-  msg_retention_time = 1300
-  kafka_version      = "1.1.1"
-  disk_size          = 200
-  band_width         = 20
-  disk_type          = "CLOUD_BASIC"
-  partition          = 400
-  charge_type        = "POSTPAID_BY_HOUR"
+# create ckafka
+resource "tencentcloud_ckafka_instance" "example" {
+  instance_name       = "tf-example"
+  zone_id             = data.tencentcloud_availability_zones_by_product.gz.zones.0.id
+  period              = 1
+  vpc_id              = tencentcloud_vpc.vpc.id
+  subnet_id           = tencentcloud_subnet.subnet.id
+  msg_retention_time  = 1300
+  renew_flag          = 0
+  kafka_version       = "2.8.1"
+  disk_size           = 200
+  disk_type           = "CLOUD_BASIC"
+  band_width          = 40
+  partition           = 400
+  specifications_type = "profession"
+  instance_type       = 1
 
   config {
     auto_create_topic_enable   = true
@@ -82,43 +65,55 @@ resource "tencentcloud_ckafka_instance" "kafka_instance_postpaid" {
 }
 ```
 
-### Multi zone Instance
+### Create multi zone instance(postpaid)
 
 ```hcl
-variable "vpc_id" {
-  default = "vpc-68vi2d3h"
+data "tencentcloud_availability_zones_by_product" "gz6" {
+  name    = "ap-guangzhou-6"
+  product = "ckafka"
 }
 
-variable "subnet_id" {
-  default = "subnet-ob6clqwk"
+data "tencentcloud_availability_zones_by_product" "gz7" {
+  name    = "ap-guangzhou-7"
+  product = "ckafka"
 }
 
-data "tencentcloud_availability_zones_by_product" "gz3" {
-  name    = "ap-guangzhou-3"
-  product = "ckafka"
+# create vpc
+resource "tencentcloud_vpc" "vpc" {
+  name       = "vpc"
+  cidr_block = "10.0.0.0/16"
 }
 
-data "tencentcloud_availability_zones_by_product" "gz6" {
-  name    = "ap-guangzhou-6"
-  product = "ckafka"
+# create vpc subnet
+resource "tencentcloud_subnet" "subnet" {
+  name              = "subnet"
+  vpc_id            = tencentcloud_vpc.vpc.id
+  availability_zone = "ap-guangzhou-6"
+  cidr_block        = "10.0.20.0/28"
+  is_multicast      = false
 }
 
-resource "tencentcloud_ckafka_instance" "kafka_instance" {
-  instance_name   = "ckafka-instance-maz-tf-test"
-  zone_id         = data.tencentcloud_availability_zones_by_product.gz3.zones.0.id
+# create ckafka
+resource "tencentcloud_ckafka_instance" "example" {
+  instance_name   = "tf-example"
+  zone_id         = data.tencentcloud_availability_zones_by_product.gz6.zones.0.id
   multi_zone_flag = true
   zone_ids = [
-    data.tencentcloud_availability_zones_by_product.gz3.zones.0.id,
-    data.tencentcloud_availability_zones_by_product.gz6.zones.0.id
+    data.tencentcloud_availability_zones_by_product.gz6.zones.0.id,
+    data.tencentcloud_availability_zones_by_product.gz7.zones.0.id,
   ]
-  period             = 1
-  vpc_id             = var.vpc_id
-  subnet_id          = var.subnet_id
-  msg_retention_time = 1300
-  renew_flag         = 0
-  kafka_version      = "1.1.1"
-  disk_size          = 500
-  disk_type          = "CLOUD_BASIC"
+  renew_flag          = 0
+  vpc_id              = tencentcloud_vpc.vpc.id
+  subnet_id           = tencentcloud_subnet.subnet.id
+  msg_retention_time  = 4320
+  kafka_version       = "2.8.1"
+  disk_size           = 200
+  disk_type           = "CLOUD_BASIC"
+  band_width          = 20
+  partition           = 400
+  specifications_type = "profession"
+  charge_type         = "POSTPAID_BY_HOUR"
+  instance_type       = 1
 
   config {
     auto_create_topic_enable   = true
@@ -155,7 +150,7 @@ The following arguments are supported:
 * `public_network` - (Optional, Int) Bandwidth of the public network.
 * `rebalance_time` - (Optional, Int) Modification of the rebalancing time after upgrade.
 * `renew_flag` - (Optional, Int) Prepaid automatic renewal mark, 0 means the default state, the initial state, 1 means automatic renewal, 2 means clear no automatic renewal (user setting).
-* `specifications_type` - (Optional, String) Specifications type of instance. Allowed values are `standard`, `profession`. Default is `profession`.
+* `specifications_type` - (Optional, String) Specifications type of instance. Allowed values are `profession`, `premium`. Default is `profession`.
 * `subnet_id` - (Optional, String) Subnet id, it will be basic network if not set.
 * `tag_set` - (Optional, Map) Tag set of instance.
 * `tags` - (Optional, List, **Deprecated**) It has been deprecated from version 1.78.5, because it do not support change. Use `tag_set` instead. Tags of instance. Partition size, the professional version does not need tag.
@@ -194,9 +189,9 @@ In addition to all arguments above, the following attributes are exported:
 
 ## Import
 
-ckafka instance can be imported using the instance_id, e.g.
+CKafka instance can be imported using the instanceId, e.g.
 
 ```
-$ terraform import tencentcloud_ckafka_instance.foo ckafka-f9ife4zz
+$ terraform import tencentcloud_ckafka_instance.example ckafka-f9ife4zz
 ```
 

From 8bd617bd3ddd61b9a1911eba9451d1b0aa9cfe1e Mon Sep 17 00:00:00 2001
From: SevenEarth <391613297@qq.com>
Date: Tue, 10 Jun 2025 16:17:52 +0800
Subject: [PATCH 2/2] add

---
 .changelog/3404.txt | 3 +++
 1 file changed, 3 insertions(+)
 create mode 100644 .changelog/3404.txt

diff --git a/.changelog/3404.txt b/.changelog/3404.txt
new file mode 100644
index 0000000000..e90becde3c
--- /dev/null
+++ b/.changelog/3404.txt
@@ -0,0 +1,3 @@
+```release-note:enhancement
+resource/tencentcloud_ckafka_instance: udapte `specifications_type` description and doc
+```