Skip to content

Commit ab2c1eb

Browse files
committed
add
1 parent 13296f2 commit ab2c1eb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tencentcloud/services/tke/resource_tc_kubernetes_cluster_extension.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ func resourceTencentCloudKubernetesClusterCreatePostHandleResponse0(ctx context.
500500
}
501501

502502
if _, ok := d.GetOk("auth_options"); ok {
503-
request := tkeGetAuthOptions(d)
503+
request := tkeGetAuthOptions(d, id)
504504
if err := service.ModifyClusterAuthenticationOptions(ctx, request); err != nil {
505505
return err
506506
}
@@ -1397,7 +1397,7 @@ func resourceTencentCloudKubernetesClusterUpdateOnExit(ctx context.Context) erro
13971397
id := d.Id()
13981398

13991399
if d.HasChange("auth_options") {
1400-
request := tkeGetAuthOptions(d)
1400+
request := tkeGetAuthOptions(d, id)
14011401
err := resource.Retry(tccommon.WriteRetryTimeout, func() *resource.RetryError {
14021402
inErr := tkeService.ModifyClusterAuthenticationOptions(ctx, request)
14031403
if inErr != nil {
@@ -2275,12 +2275,12 @@ func tkeGetNodePoolGlobalConfig(d *schema.ResourceData) *tke.ModifyClusterAsGrou
22752275
return request
22762276
}
22772277

2278-
func tkeGetAuthOptions(d *schema.ResourceData) *tke.ModifyClusterAuthenticationOptionsRequest {
2278+
func tkeGetAuthOptions(d *schema.ResourceData, clusterId string) *tke.ModifyClusterAuthenticationOptionsRequest {
22792279
raw, ok := d.GetOk("auth_options")
22802280
options := raw.([]interface{})
22812281

22822282
request := tke.NewModifyClusterAuthenticationOptionsRequest()
2283-
request.ClusterId = helper.String(d.Id())
2283+
request.ClusterId = helper.String(clusterId)
22842284
request.ServiceAccounts = &tke.ServiceAccountAuthenticationOptions{
22852285
AutoCreateDiscoveryAnonymousAuth: helper.Bool(false),
22862286
}

0 commit comments

Comments
 (0)