diff --git a/.changelog/3392.txt b/.changelog/3392.txt new file mode 100644 index 0000000000..4045371ef1 --- /dev/null +++ b/.changelog/3392.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/tencentcloud/services/tke/resource_tc_kubernetes_scale_worker.go b/tencentcloud/services/tke/resource_tc_kubernetes_scale_worker.go index 3ca894e9a9..1842e2460e 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.", + }, }, }, }, diff --git a/website/docs/r/kubernetes_scale_worker.html.markdown b/website/docs/r/kubernetes_scale_worker.html.markdown index 686e037fe8..b94638baee 100644 --- a/website/docs/r/kubernetes_scale_worker.html.markdown +++ b/website/docs/r/kubernetes_scale_worker.html.markdown @@ -157,6 +157,7 @@ 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`.