diff --git a/.changelog/2918.txt b/.changelog/2918.txt new file mode 100644 index 0000000000..9085f5c0a4 --- /dev/null +++ b/.changelog/2918.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +resource/tencentcloud_kubernetes_cluster: support `cluster_os` field to update and adjust its set logic +``` \ No newline at end of file diff --git a/go.mod b/go.mod index f4d469de78..3485df17ac 100644 --- a/go.mod +++ b/go.mod @@ -46,7 +46,7 @@ require ( github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/clb v1.0.984 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cloudaudit v1.0.544 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cls v1.0.970 - github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1027 + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1031 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm v1.0.1014 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cwp v1.0.762 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cynosdb v1.0.692 @@ -91,7 +91,7 @@ require ( github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tdmq v1.0.955 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tem v1.0.578 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo v1.0.1013 - github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke v1.0.1027 + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke v1.0.1031 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/trocket v1.0.947 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tse v1.0.857 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tsf v1.0.674 diff --git a/go.sum b/go.sum index bf41576b1b..4927b60a30 100644 --- a/go.sum +++ b/go.sum @@ -941,6 +941,10 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1025 h1:VBC github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1025/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1027 h1:4/chUqYM26idp2Rd3pPmsL94RTAwIM5dGXoaskOQ+cM= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1027/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1030 h1:kwiUoCkooUgy7iPyhEEbio7WT21kGJUeZ5JeJfb/dYk= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1030/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1031 h1:3ouglYKE5cwhx2vwICGeW7pAlwyCLnpQd7O0l3hCSTg= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1031/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/controlcenter v1.0.993 h1:WlPgXldQCxt7qi5Xrc6j6zTrsXWzN5BcOGs7Irq7fwQ= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/controlcenter v1.0.993/go.mod h1:Z9U8zNtyuyKhjS0698wqsrG/kLx1TQ5CEixXBwVe7xY= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/csip v1.0.860 h1:F3esKBIT3HW9+7Gt8cVgf8X06VdGIczpgLBUECzSEzU= @@ -1051,6 +1055,10 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke v1.0.1025 h1:KQTBLt github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke v1.0.1025/go.mod h1:WBsBVG3Qb9bupdElk/d/S7xLadGwyBvKF2VikkezhjE= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke v1.0.1027 h1:CCbjHzYueJMa6O3aH2zn/Uppp+u7YJSd7oTrtypxGhM= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke v1.0.1027/go.mod h1:U0WwaLeMZf4Qx1SGG6TlFBhwlV03BMF5F176G14W9Qc= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke v1.0.1030 h1:/PpJ0QVuKHaZ3khR17DktATXccHT8761D9bTZwPmrHY= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke v1.0.1030/go.mod h1:h9iblPtLWJRVlVyFFwYM+3V54B3i1JZq6yxmSVnY49c= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke v1.0.1031 h1:0Ew48YnVO+Sd2U3VrWgV36uRySTF7uOOFJH0Hd4ufhg= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke v1.0.1031/go.mod h1:KcKTYEXZil0FciUtQ75svPL4hZpLYVnemAeW27N3OKY= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/trocket v1.0.947 h1:iZfuU8S86kfqFsAVT/LUApP8L5cpT90hl2wSKiUDVvw= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/trocket v1.0.947/go.mod h1:eAgJ+XUEhffMq79zjpgHoR3PBVcciSg+LuPDC8hLWsE= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tse v1.0.857 h1:TkJnvSeRSXsRCwOwcwXSvruSK9s/kw8LC3FLeccw+A0= diff --git a/tencentcloud/services/tke/resource_tc_kubernetes_cluster.go b/tencentcloud/services/tke/resource_tc_kubernetes_cluster.go index c536428610..a2f306121d 100644 --- a/tencentcloud/services/tke/resource_tc_kubernetes_cluster.go +++ b/tencentcloud/services/tke/resource_tc_kubernetes_cluster.go @@ -41,7 +41,6 @@ func ResourceTencentCloudKubernetesCluster() *schema.Resource { "cluster_os": { Type: schema.TypeString, Optional: true, - ForceNew: true, Default: "tlinux2.4x86_64", Description: "Cluster operating system, supports setting public images (the field passes the corresponding image Name) and custom images (the field passes the corresponding image ID). For details, please refer to: https://cloud.tencent.com/document/product/457/68289.", }, @@ -1864,6 +1863,39 @@ func resourceTencentCloudKubernetesClusterUpdate(d *schema.ResourceData, meta in } } + needChange3 := false + mutableArgs3 := []string{"cluster_os"} + for _, v := range mutableArgs3 { + if d.HasChange(v) { + needChange3 = true + break + } + } + + if needChange3 { + request3 := tkev20180525.NewModifyClusterImageRequest() + + request3.ClusterId = helper.String(clusterId) + + if v, ok := d.GetOk("cluster_os"); ok { + request3.ImageId = helper.String(v.(string)) + } + + err := resource.Retry(tccommon.WriteRetryTimeout, func() *resource.RetryError { + result, e := meta.(tccommon.ProviderMeta).GetAPIV3Conn().UseTkeV20180525Client().ModifyClusterImageWithContext(ctx, request3) + if e != nil { + return tccommon.RetryError(e) + } else { + log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request3.GetAction(), request3.ToJsonString(), result.ToJsonString()) + } + return nil + }) + if err != nil { + log.Printf("[CRITAL]%s update kubernetes cluster failed, reason:%+v", logId, err) + return err + } + } + if err := resourceTencentCloudKubernetesClusterUpdateOnExit(ctx); err != nil { return err } diff --git a/tencentcloud/services/tke/resource_tc_kubernetes_cluster_extension.go b/tencentcloud/services/tke/resource_tc_kubernetes_cluster_extension.go index 34b7a3b34c..238bf9f8f0 100644 --- a/tencentcloud/services/tke/resource_tc_kubernetes_cluster_extension.go +++ b/tencentcloud/services/tke/resource_tc_kubernetes_cluster_extension.go @@ -593,6 +593,11 @@ func resourceTencentCloudKubernetesClusterReadPostHandleResponse0(ctx context.Co newOs = oldOs } _ = d.Set("cluster_os", newOs) + // When ImageId is not empty, cluster_os is ImageId. When ImageId is empty, cluster_os displays ClusterOs + if cluster.ImageId != nil && *cluster.ImageId != "" { + _ = d.Set("cluster_os", *cluster.ImageId) + } + _ = d.Set("tags", clusterInfo.Tags) _ = d.Set("vpc_cni_type", clusterInfo.VpcCniType) @@ -1567,8 +1572,8 @@ func clusterCidrValidateFunc(v interface{}, k string) (ws []string, errs []error errs = append(errs, fmt.Errorf("%q must be a network segment", k)) return } - if !strings.HasPrefix(value, "9.") && !strings.HasPrefix(value, "10.") && !strings.HasPrefix(value, "192.168.") && !strings.HasPrefix(value, "172.") { - errs = append(errs, fmt.Errorf("%q must in 9. | 10. | 192.168. | 172.[16-31]", k)) + if !strings.HasPrefix(value, "9.") && !strings.HasPrefix(value, "10.") && !strings.HasPrefix(value, "11.") && !strings.HasPrefix(value, "192.168.") && !strings.HasPrefix(value, "172.") { + errs = append(errs, fmt.Errorf("%q must in 9. | 10. | 11. | 192.168. | 172.[16-31]", k)) return } @@ -1576,7 +1581,7 @@ func clusterCidrValidateFunc(v interface{}, k string) (ws []string, errs []error nextNo := strings.Split(value, ".")[1] no, _ := strconv.ParseInt(nextNo, 10, 64) if no < 16 || no > 31 { - errs = append(errs, fmt.Errorf("%q must in 9.0 | 10. | 192.168. | 172.[16-31]", k)) + errs = append(errs, fmt.Errorf("%q must in 9.0 | 10. | 11. | 192.168. | 172.[16-31]", k)) return } } diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/request.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/request.go index a38b8081e1..d439479622 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/request.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/request.go @@ -265,7 +265,7 @@ func CompleteCommonParams(request Request, region string, requestClient string) params["Action"] = request.GetAction() params["Timestamp"] = strconv.FormatInt(time.Now().Unix(), 10) params["Nonce"] = strconv.Itoa(rand.Int()) - params["RequestClient"] = "SDK_GO_1.0.1027" + params["RequestClient"] = "SDK_GO_1.0.1031" if requestClient != "" { params["RequestClient"] += ": " + requestClient } diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525/client.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525/client.go index 69b74cc88b..54ce27e891 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525/client.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525/client.go @@ -12703,6 +12703,79 @@ func (c *Client) ModifyClusterEndpointSPWithContext(ctx context.Context, request return } +func NewModifyClusterImageRequest() (request *ModifyClusterImageRequest) { + request = &ModifyClusterImageRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + + request.Init().WithApiInfo("tke", APIVersion, "ModifyClusterImage") + + + return +} + +func NewModifyClusterImageResponse() (response *ModifyClusterImageResponse) { + response = &ModifyClusterImageResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return + +} + +// ModifyClusterImage +// 修改集群镜像 +// +// 可能返回的错误码: +// FAILEDOPERATION_DBRECORDNOTFOUND = "FailedOperation.DbRecordNotFound" +// FAILEDOPERATION_PARAM = "FailedOperation.Param" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_IMAGEIDNOTFOUND = "InternalError.ImageIdNotFound" +// INTERNALERROR_OSNOTSUPPORT = "InternalError.OsNotSupport" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_VERSIONNOTSUPPORTCGROUPV2 = "InvalidParameter.VersionNotSupportCgroupV2" +func (c *Client) ModifyClusterImage(request *ModifyClusterImageRequest) (response *ModifyClusterImageResponse, err error) { + return c.ModifyClusterImageWithContext(context.Background(), request) +} + +// ModifyClusterImage +// 修改集群镜像 +// +// 可能返回的错误码: +// FAILEDOPERATION_DBRECORDNOTFOUND = "FailedOperation.DbRecordNotFound" +// FAILEDOPERATION_PARAM = "FailedOperation.Param" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CVMCOMMON = "InternalError.CvmCommon" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_DBRECORDNOTFOUND = "InternalError.DbRecordNotFound" +// INTERNALERROR_IMAGEIDNOTFOUND = "InternalError.ImageIdNotFound" +// INTERNALERROR_OSNOTSUPPORT = "InternalError.OsNotSupport" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_VERSIONNOTSUPPORTCGROUPV2 = "InvalidParameter.VersionNotSupportCgroupV2" +func (c *Client) ModifyClusterImageWithContext(ctx context.Context, request *ModifyClusterImageRequest) (response *ModifyClusterImageResponse, err error) { + if request == nil { + request = NewModifyClusterImageRequest() + } + + if c.GetCredential() == nil { + return nil, errors.New("ModifyClusterImage require credential") + } + + request.SetContext(ctx) + + response = NewModifyClusterImageResponse() + err = c.Send(request, response) + return +} + func NewModifyClusterNodePoolRequest() (request *ModifyClusterNodePoolRequest) { request = &ModifyClusterNodePoolRequest{ BaseRequest: &tchttp.BaseRequest{}, diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525/models.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525/models.go index ca760015d8..32945153f9 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525/models.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525/models.go @@ -16395,6 +16395,67 @@ func (r *ModifyClusterEndpointSPResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } +// Predefined struct for user +type ModifyClusterImageRequestParams struct { + // 集群ID + ClusterId *string `json:"ClusterId,omitnil,omitempty" name:"ClusterId"` + + // 指定有效的镜像ID,格式形如img-xxxx。可通过登录控制台查询,也可调用接口 [DescribeImages](https://cloud.tencent.com/document/api/213/15715),取返回信息中的ImageId字段。 + ImageId *string `json:"ImageId,omitnil,omitempty" name:"ImageId"` +} + +type ModifyClusterImageRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitnil,omitempty" name:"ClusterId"` + + // 指定有效的镜像ID,格式形如img-xxxx。可通过登录控制台查询,也可调用接口 [DescribeImages](https://cloud.tencent.com/document/api/213/15715),取返回信息中的ImageId字段。 + ImageId *string `json:"ImageId,omitnil,omitempty" name:"ImageId"` +} + +func (r *ModifyClusterImageRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyClusterImageRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + delete(f, "ImageId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyClusterImageRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +// Predefined struct for user +type ModifyClusterImageResponseParams struct { + // 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"` +} + +type ModifyClusterImageResponse struct { + *tchttp.BaseResponse + Response *ModifyClusterImageResponseParams `json:"Response"` +} + +func (r *ModifyClusterImageResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyClusterImageResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + // Predefined struct for user type ModifyClusterNodePoolRequestParams struct { // 集群ID diff --git a/vendor/modules.txt b/vendor/modules.txt index 11313326fc..2939cdb3b9 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1163,7 +1163,7 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cloudaudit/v20190319 # github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cls v1.0.970 ## explicit; go 1.14 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cls/v20201016 -# github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1027 +# github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1031 ## explicit; go 1.11 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors @@ -1321,7 +1321,7 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901 # github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/thpc v1.0.998 ## explicit; go 1.14 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/thpc/v20230321 -# github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke v1.0.1027 +# github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke v1.0.1031 ## explicit; go 1.14 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20220501 diff --git a/website/docs/r/kubernetes_cluster.html.markdown b/website/docs/r/kubernetes_cluster.html.markdown index 8297ae6204..1418811572 100644 --- a/website/docs/r/kubernetes_cluster.html.markdown +++ b/website/docs/r/kubernetes_cluster.html.markdown @@ -846,7 +846,7 @@ The following arguments are supported: * `cluster_max_service_num` - (Optional, Int, ForceNew) The maximum number of services in the cluster. Default is 256. The range is from 32 to 32768. When its power unequal to 2, it will round upward to the closest power of 2. * `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) Cluster operating system, supports setting public images (the field passes the corresponding image Name) and custom images (the field passes the corresponding image ID). For details, please refer to: https://cloud.tencent.com/document/product/457/68289. +* `cluster_os` - (Optional, String) Cluster operating system, supports setting public images (the field passes the corresponding image Name) and custom images (the field passes the corresponding image ID). For details, please refer to: https://cloud.tencent.com/document/product/457/68289. * `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'.