Skip to content

fix(tke): [126079732] tencentcloud_kubernetes_native_node_pool optmize code logic for update function #3453

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/3453.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
resource/tencentcloud_kubernetes_native_node_pool: optmize code logic for update function
```

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
Provides a resource to create a tke kubernetes_native_node_pool
Provides a resource to create a TKE kubernetes native node pool

Example Usage

```hcl
resource "tencentcloud_kubernetes_native_node_pool" "kubernetes_native_node_pool" {
resource "tencentcloud_kubernetes_native_node_pool" "example" {
cluster_id = "cls-eyier120"
name = "native-node-pool"
name = "tf-example"
type = "Native"

labels {
name = "test11"
value = "test21"
}

taints {
key = "product"
value = "coderider"
effect = "NoExecute"
name = "labelName"
value = "labelValue"
}

tags {
Expand All @@ -25,6 +19,7 @@ resource "tencentcloud_kubernetes_native_node_pool" "kubernetes_native_node_pool
key = "keep-test-np1"
value = "test1"
}

tags {
key = "keep-test-np3"
value = "test3"
Expand All @@ -40,51 +35,59 @@ resource "tencentcloud_kubernetes_native_node_pool" "kubernetes_native_node_pool
max_replicas = 10
create_policy = "ZoneEquality"
}
subnet_ids = ["subnet-itb6d123"]
instance_charge_type = "PREPAID"

subnet_ids = ["subnet-itb6d123"]
system_disk {
disk_type = "CLOUD_SSD"
disk_type = "CLOUD_PREMIUM"
disk_size = 50
}
instance_types = ["SA2.MEDIUM2"]
security_group_ids = ["sg-7tum9120"]
auto_repair = false

instance_types = ["SA2.MEDIUM2"]
security_group_ids = ["sg-7tum9120"]
auto_repair = false
instance_charge_type = "PREPAID"
instance_charge_prepaid {
period = 1
renew_flag = "NOTIFY_AND_MANUAL_RENEW"
}

management {
nameservers = ["183.60.83.19", "183.60.82.98"]
hosts = ["192.168.2.42 static.fake.com", "192.168.2.42 static.fake.com2"]
kernel_args = ["kernel.pid_max=65535", "fs.file-max=400000"]
}

host_name_pattern = "aaa{R:3}"
kubelet_args = ["allowed-unsafe-sysctls=net.core.somaxconn", "root-dir=/var/lib/test"]
lifecycle {
pre_init = "ZWNobyBoZWxsb3dvcmxk"
post_init = "ZWNobyBoZWxsb3dvcmxk"
}

runtime_root_dir = "/var/lib/docker"
enable_autoscaling = true
replicas = 2
internet_accessible {
max_bandwidth_out = 50
charge_type = "TRAFFIC_POSTPAID_BY_HOUR"
}

data_disks {
disk_type = "CLOUD_PREMIUM"
file_system = "ext4"
disk_size = 60
disk_size = 100
mount_target = "/var/lib/containerd"
auto_format_and_mount = true
}

key_ids = ["skey-9pcs2100"]
}

annotations {
name = "node.tke.cloud.tencent.com/test-anno"
value = "test"
}

annotations {
name = "node.tke.cloud.tencent.com/test-label"
value = "test"
Expand All @@ -94,8 +97,8 @@ resource "tencentcloud_kubernetes_native_node_pool" "kubernetes_native_node_pool

Import

tke kubernetes_native_node_pool can be imported using the id, e.g.
TKE kubernetes native node pool can be imported using the id, e.g.

```
terraform import tencentcloud_kubernetes_native_node_pool.kubernetes_native_node_pool cls-xxx#np-xxx
terraform import tencentcloud_kubernetes_native_node_pool.kubernetes_native_node_pool cls-eyier120#np-4h43fuxj
```
45 changes: 24 additions & 21 deletions website/docs/r/kubernetes_native_node_pool.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,24 @@ layout: "tencentcloud"
page_title: "TencentCloud: tencentcloud_kubernetes_native_node_pool"
sidebar_current: "docs-tencentcloud-resource-kubernetes_native_node_pool"
description: |-
Provides a resource to create a tke kubernetes_native_node_pool
Provides a resource to create a TKE kubernetes native node pool
---

# tencentcloud_kubernetes_native_node_pool

Provides a resource to create a tke kubernetes_native_node_pool
Provides a resource to create a TKE kubernetes native node pool

## Example Usage

```hcl
resource "tencentcloud_kubernetes_native_node_pool" "kubernetes_native_node_pool" {
resource "tencentcloud_kubernetes_native_node_pool" "example" {
cluster_id = "cls-eyier120"
name = "native-node-pool"
name = "tf-example"
type = "Native"

labels {
name = "test11"
value = "test21"
}

taints {
key = "product"
value = "coderider"
effect = "NoExecute"
name = "labelName"
value = "labelValue"
}

tags {
Expand All @@ -36,6 +30,7 @@ resource "tencentcloud_kubernetes_native_node_pool" "kubernetes_native_node_pool
key = "keep-test-np1"
value = "test1"
}

tags {
key = "keep-test-np3"
value = "test3"
Expand All @@ -51,51 +46,59 @@ resource "tencentcloud_kubernetes_native_node_pool" "kubernetes_native_node_pool
max_replicas = 10
create_policy = "ZoneEquality"
}
subnet_ids = ["subnet-itb6d123"]
instance_charge_type = "PREPAID"

subnet_ids = ["subnet-itb6d123"]
system_disk {
disk_type = "CLOUD_SSD"
disk_type = "CLOUD_PREMIUM"
disk_size = 50
}
instance_types = ["SA2.MEDIUM2"]
security_group_ids = ["sg-7tum9120"]
auto_repair = false

instance_types = ["SA2.MEDIUM2"]
security_group_ids = ["sg-7tum9120"]
auto_repair = false
instance_charge_type = "PREPAID"
instance_charge_prepaid {
period = 1
renew_flag = "NOTIFY_AND_MANUAL_RENEW"
}

management {
nameservers = ["183.60.83.19", "183.60.82.98"]
hosts = ["192.168.2.42 static.fake.com", "192.168.2.42 static.fake.com2"]
kernel_args = ["kernel.pid_max=65535", "fs.file-max=400000"]
}

host_name_pattern = "aaa{R:3}"
kubelet_args = ["allowed-unsafe-sysctls=net.core.somaxconn", "root-dir=/var/lib/test"]
lifecycle {
pre_init = "ZWNobyBoZWxsb3dvcmxk"
post_init = "ZWNobyBoZWxsb3dvcmxk"
}

runtime_root_dir = "/var/lib/docker"
enable_autoscaling = true
replicas = 2
internet_accessible {
max_bandwidth_out = 50
charge_type = "TRAFFIC_POSTPAID_BY_HOUR"
}

data_disks {
disk_type = "CLOUD_PREMIUM"
file_system = "ext4"
disk_size = 60
disk_size = 100
mount_target = "/var/lib/containerd"
auto_format_and_mount = true
}

key_ids = ["skey-9pcs2100"]
}

annotations {
name = "node.tke.cloud.tencent.com/test-anno"
value = "test"
}

annotations {
name = "node.tke.cloud.tencent.com/test-label"
value = "test"
Expand Down Expand Up @@ -227,9 +230,9 @@ In addition to all arguments above, the following attributes are exported:

## Import

tke kubernetes_native_node_pool can be imported using the id, e.g.
TKE kubernetes native node pool can be imported using the id, e.g.

```
terraform import tencentcloud_kubernetes_native_node_pool.kubernetes_native_node_pool cls-xxx#np-xxx
terraform import tencentcloud_kubernetes_native_node_pool.kubernetes_native_node_pool cls-eyier120#np-4h43fuxj
```

Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy