From eda3ffa82da9b481b9fd3a2110ac78444065bfe6 Mon Sep 17 00:00:00 2001 From: nickduan Date: Wed, 4 Jun 2025 16:47:11 +0800 Subject: [PATCH 1/3] tke scale worker support delete_with_instance --- .../services/tke/resource_tc_kubernetes_scale_worker.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tencentcloud/services/tke/resource_tc_kubernetes_scale_worker.go b/tencentcloud/services/tke/resource_tc_kubernetes_scale_worker.go index 3ca894e9a9..507afa3426 100644 --- a/tencentcloud/services/tke/resource_tc_kubernetes_scale_worker.go +++ b/tencentcloud/services/tke/resource_tc_kubernetes_scale_worker.go @@ -80,6 +80,13 @@ func ResourceTencentCloudKubernetesScaleWorker() *schema.Resource { Default: "", Description: "The name of the device or partition to mount.", }, + "delete_with_instance": { + Type: schema.TypeBool, + Optional: true, + ForceNew: true, + Default: true, + Description: "Indicate whether to delete the disk when deleting the instance. Only supports disk paid by the hour", + }, }, }, }, From 3af9164ae2e6985c0e81a732391eda016b9e8139 Mon Sep 17 00:00:00 2001 From: nickduan Date: Wed, 4 Jun 2025 16:55:51 +0800 Subject: [PATCH 2/3] update doc and add changelog --- .changelog/3387.txt | 3 +++ website/docs/r/kubernetes_scale_worker.html.markdown | 1 + 2 files changed, 4 insertions(+) create mode 100644 .changelog/3387.txt diff --git a/.changelog/3387.txt b/.changelog/3387.txt new file mode 100644 index 0000000000..4045371ef1 --- /dev/null +++ b/.changelog/3387.txt @@ -0,0 +1,3 @@ +```release-note:new-resource +resource/tencentcloud_kubernetes_scale_worker: support `data_disk.delete_with_instance` param +``` \ No newline at end of file diff --git a/website/docs/r/kubernetes_scale_worker.html.markdown b/website/docs/r/kubernetes_scale_worker.html.markdown index 686e037fe8..f8a9fbef90 100644 --- a/website/docs/r/kubernetes_scale_worker.html.markdown +++ b/website/docs/r/kubernetes_scale_worker.html.markdown @@ -162,6 +162,7 @@ The `data_disk` object supports the following: * `disk_type` - (Optional, String, ForceNew) Types of disk, available values: `CLOUD_PREMIUM` and `CLOUD_SSD` and `CLOUD_HSSD` and `CLOUD_TSSD`. * `file_system` - (Optional, String, ForceNew) File system, e.g. `ext3/ext4/xfs`. * `mount_target` - (Optional, String, ForceNew) Mount target. +* `delete_with_instance` - (Optional, Bool, ForceNew) Indicate whether to delete the disk when deleting the instance. Only supports disk paid by the hour. Default is `true`. The `gpu_args` object supports the following: From 6a413ba08e648f81e392886f702fcff8cf2b6815 Mon Sep 17 00:00:00 2001 From: nickduan Date: Wed, 4 Jun 2025 17:59:14 +0800 Subject: [PATCH 3/3] lint && update doc --- .changelog/{3387.txt => 3392.txt} | 0 .../tke/resource_tc_kubernetes_scale_worker.go | 10 +++++----- website/docs/r/kubernetes_scale_worker.html.markdown | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) rename .changelog/{3387.txt => 3392.txt} (100%) diff --git a/.changelog/3387.txt b/.changelog/3392.txt similarity index 100% rename from .changelog/3387.txt rename to .changelog/3392.txt diff --git a/tencentcloud/services/tke/resource_tc_kubernetes_scale_worker.go b/tencentcloud/services/tke/resource_tc_kubernetes_scale_worker.go index 507afa3426..1842e2460e 100644 --- a/tencentcloud/services/tke/resource_tc_kubernetes_scale_worker.go +++ b/tencentcloud/services/tke/resource_tc_kubernetes_scale_worker.go @@ -81,11 +81,11 @@ func ResourceTencentCloudKubernetesScaleWorker() *schema.Resource { Description: "The name of the device or partition to mount.", }, "delete_with_instance": { - Type: schema.TypeBool, - Optional: true, - ForceNew: true, - Default: true, - Description: "Indicate whether to delete the disk when deleting the instance. Only supports disk paid by the hour", + Type: schema.TypeBool, + Optional: true, + ForceNew: true, + Default: true, + Description: "Indicate whether to delete the disk when deleting the instance. Only supports disk paid by the hour.", }, }, }, diff --git a/website/docs/r/kubernetes_scale_worker.html.markdown b/website/docs/r/kubernetes_scale_worker.html.markdown index f8a9fbef90..b94638baee 100644 --- a/website/docs/r/kubernetes_scale_worker.html.markdown +++ b/website/docs/r/kubernetes_scale_worker.html.markdown @@ -157,12 +157,12 @@ The `data_disk` object of `worker_config` supports the following: The `data_disk` object supports the following: * `auto_format_and_mount` - (Optional, Bool, ForceNew) Indicate whether to auto format and mount or not. Default is `false`. +* `delete_with_instance` - (Optional, Bool, ForceNew) Indicate whether to delete the disk when deleting the instance. Only supports disk paid by the hour. * `disk_partition` - (Optional, String, ForceNew) The name of the device or partition to mount. * `disk_size` - (Optional, Int, ForceNew) Volume of disk in GB. Default is `0`. * `disk_type` - (Optional, String, ForceNew) Types of disk, available values: `CLOUD_PREMIUM` and `CLOUD_SSD` and `CLOUD_HSSD` and `CLOUD_TSSD`. * `file_system` - (Optional, String, ForceNew) File system, e.g. `ext3/ext4/xfs`. * `mount_target` - (Optional, String, ForceNew) Mount target. -* `delete_with_instance` - (Optional, Bool, ForceNew) Indicate whether to delete the disk when deleting the instance. Only supports disk paid by the hour. Default is `true`. The `gpu_args` object supports the following: