diff --git a/common/common_volcengine_version.go b/common/common_volcengine_version.go index 5c0f3a8b..9a2b6408 100644 --- a/common/common_volcengine_version.go +++ b/common/common_volcengine_version.go @@ -2,5 +2,5 @@ package common const ( TerraformProviderName = "terraform-provider-volcengine" - TerraformProviderVersion = "0.0.43" + TerraformProviderVersion = "0.0.44" ) diff --git a/volcengine/vke/cluster/resource_volcengine_vke_cluster.go b/volcengine/vke/cluster/resource_volcengine_vke_cluster.go index 9b452f90..e48c5b2a 100644 --- a/volcengine/vke/cluster/resource_volcengine_vke_cluster.go +++ b/volcengine/vke/cluster/resource_volcengine_vke_cluster.go @@ -2,6 +2,7 @@ package cluster import ( "fmt" + "strings" "time" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" @@ -55,10 +56,16 @@ func ResourceVolcengineVkeCluster() *schema.Resource { Description: "The delete protection of the cluster, the value is `true` or `false`.", }, "kubernetes_version": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + if k == "kubernetes_version" && strings.Contains(old, new) { + return true + } + return false + }, Description: "The version of Kubernetes specified when creating a VKE cluster (specified to patch version), if not specified, the latest Kubernetes version supported by VKE is used by default, which is a 3-segment version format starting with a lowercase v, that is, KubernetesVersion with IsLatestVersion=True in the return value of ListSupportedVersions.", }, "tags": ve.TagsSchema(),