Skip to content

feat(tke): [116732448]Field cluster_subnet_id supports ForceNew #2578

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
Apr 1, 2024
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/2578.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
resource/tencentcloud_kubernetes_cluster: Field `cluster_subnet_id` supports ForceNew
```
5 changes: 1 addition & 4 deletions tencentcloud/services/tke/resource_tc_kubernetes_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,7 @@ func ResourceTencentCloudTkeCluster() *schema.Resource {
"cluster_subnet_id": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
Description: "Subnet ID of the cluster, such as: subnet-b3p7d7q5.",
},

Expand Down Expand Up @@ -2494,10 +2495,6 @@ func resourceTencentCloudTkeClusterUpdate(d *schema.ResourceData, meta interface
region := client.Region
d.Partial(true)

if d.HasChange("cluster_subnet_id") {
return fmt.Errorf("argument cluster_subnet_id cannot be changed")
}

if d.HasChange("tags") {
oldTags, newTags := d.GetChange("tags")
replaceTags, deleteTags := svctag.DiffTags(oldTags.(map[string]interface{}), newTags.(map[string]interface{}))
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/kubernetes_cluster.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,7 @@ The following arguments are supported:
* `cluster_name` - (Optional, String) Name of the cluster.
* `cluster_os_type` - (Optional, String, ForceNew) Image type of the cluster os, the available values include: 'GENERAL'. Default is 'GENERAL'.
* `cluster_os` - (Optional, String, ForceNew) Operating system of the cluster, the available values include: 'centos7.6.0_x64','ubuntu18.04.1x86_64','tlinux2.4x86_64'. Default is 'tlinux2.4x86_64'.
* `cluster_subnet_id` - (Optional, String) Subnet ID of the cluster, such as: subnet-b3p7d7q5.
* `cluster_subnet_id` - (Optional, String, ForceNew) Subnet ID of the cluster, such as: subnet-b3p7d7q5.
* `cluster_version` - (Optional, String) Version of the cluster. Use `tencentcloud_kubernetes_available_cluster_versions` to get the upgradable cluster version.
* `container_runtime` - (Optional, String, ForceNew) Runtime type of the cluster, the available values include: 'docker' and 'containerd'.The Kubernetes v1.24 has removed dockershim, so please use containerd in v1.24 or higher.Default is 'docker'.
* `deletion_protection` - (Optional, Bool) Indicates whether cluster deletion protection is enabled. Default is false.
Expand Down