Skip to content

Commit

Permalink
Merge pull request #51 from volcengine/feat/comp_kubernetes_version
Browse files Browse the repository at this point in the history
Feat/comp kubernetes version
  • Loading branch information
xuyaming0800 authored Dec 27, 2022
2 parents dd1ad30 + bb1c10c commit 948f09a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion common/common_volcengine_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ package common

const (
TerraformProviderName = "terraform-provider-volcengine"
TerraformProviderVersion = "0.0.43"
TerraformProviderVersion = "0.0.44"
)
15 changes: 11 additions & 4 deletions volcengine/vke/cluster/resource_volcengine_vke_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package cluster

import (
"fmt"
"strings"
"time"

"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
Expand Down Expand Up @@ -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(),
Expand Down

0 comments on commit 948f09a

Please sign in to comment.