@@ -500,7 +500,7 @@ func resourceTencentCloudKubernetesClusterCreatePostHandleResponse0(ctx context.
500
500
}
501
501
502
502
if _ , ok := d .GetOk ("auth_options" ); ok {
503
- request := tkeGetAuthOptions (d )
503
+ request := tkeGetAuthOptions (d , id )
504
504
if err := service .ModifyClusterAuthenticationOptions (ctx , request ); err != nil {
505
505
return err
506
506
}
@@ -1397,7 +1397,7 @@ func resourceTencentCloudKubernetesClusterUpdateOnExit(ctx context.Context) erro
1397
1397
id := d .Id ()
1398
1398
1399
1399
if d .HasChange ("auth_options" ) {
1400
- request := tkeGetAuthOptions (d )
1400
+ request := tkeGetAuthOptions (d , id )
1401
1401
err := resource .Retry (tccommon .WriteRetryTimeout , func () * resource.RetryError {
1402
1402
inErr := tkeService .ModifyClusterAuthenticationOptions (ctx , request )
1403
1403
if inErr != nil {
@@ -2275,12 +2275,12 @@ func tkeGetNodePoolGlobalConfig(d *schema.ResourceData) *tke.ModifyClusterAsGrou
2275
2275
return request
2276
2276
}
2277
2277
2278
- func tkeGetAuthOptions (d * schema.ResourceData ) * tke.ModifyClusterAuthenticationOptionsRequest {
2278
+ func tkeGetAuthOptions (d * schema.ResourceData , clusterId string ) * tke.ModifyClusterAuthenticationOptionsRequest {
2279
2279
raw , ok := d .GetOk ("auth_options" )
2280
2280
options := raw .([]interface {})
2281
2281
2282
2282
request := tke .NewModifyClusterAuthenticationOptionsRequest ()
2283
- request .ClusterId = helper .String (d . Id () )
2283
+ request .ClusterId = helper .String (clusterId )
2284
2284
request .ServiceAccounts = & tke.ServiceAccountAuthenticationOptions {
2285
2285
AutoCreateDiscoveryAnonymousAuth : helper .Bool (false ),
2286
2286
}
0 commit comments