Skip to content

Commit e5bf478

Browse files
committed
add
1 parent a4374c2 commit e5bf478

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

tencentcloud/services/tke/resource_tc_kubernetes_cluster_master_attachment_extension.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,25 +33,23 @@ func resourceTencentCloudKubernetesClusterMasterAttachmentCreatePostFillRequest0
3333
}
3434

3535
if v, ok := d.GetOkExists("enhanced_security_service"); ok {
36-
enhancedService.SecurityService = &tkev20180525.RunSecurityServiceEnabled{
37-
Enabled: helper.Bool(v.(bool)),
38-
}
36+
enhancedService.SecurityService = &tkev20180525.RunSecurityServiceEnabled{Enabled: helper.Bool(v.(bool))}
37+
existedInstancesPara.EnhancedService = &enhancedService
3938
}
4039

4140
if v, ok := d.GetOkExists("enhanced_monitor_service"); ok {
42-
enhancedService.MonitorService = &tkev20180525.RunMonitorServiceEnabled{
43-
Enabled: helper.Bool(v.(bool)),
44-
}
41+
enhancedService.MonitorService = &tkev20180525.RunMonitorServiceEnabled{Enabled: helper.Bool(v.(bool))}
42+
existedInstancesPara.EnhancedService = &enhancedService
4543
}
4644

4745
if v, ok := d.GetOkExists("enhanced_automation_service"); ok {
48-
enhancedService.AutomationService = &tkev20180525.RunAutomationServiceEnabled{
49-
Enabled: helper.Bool(v.(bool)),
50-
}
46+
enhancedService.AutomationService = &tkev20180525.RunAutomationServiceEnabled{Enabled: helper.Bool(v.(bool))}
47+
existedInstancesPara.EnhancedService = &enhancedService
5148
}
5249

5350
if v, ok := d.GetOk("password"); ok {
5451
loginSettings.Password = helper.String(v.(string))
52+
existedInstancesPara.LoginSettings = &loginSettings
5553
}
5654

5755
if v, ok := d.GetOk("key_ids"); ok && len(v.([]interface{})) > 0 {
@@ -61,6 +59,8 @@ func resourceTencentCloudKubernetesClusterMasterAttachmentCreatePostFillRequest0
6159
keyId := keyIds[i].(string)
6260
loginSettings.KeyIds = append(loginSettings.KeyIds, &keyId)
6361
}
62+
63+
existedInstancesPara.LoginSettings = &loginSettings
6464
}
6565

6666
if v, ok := d.GetOk("security_group_ids"); ok && len(v.([]interface{})) > 0 {
@@ -309,7 +309,7 @@ func resourceTencentCloudKubernetesClusterMasterAttachmentCreatePostHandleRespon
309309
}
310310

311311
if *resp.InstanceSet[0].InstanceState != "running" {
312-
return resource.RetryableError(fmt.Errorf("tke master node cvm instance %s in tke status is %s, retry...", instanceId, resp.InstanceSet[0].InstanceState))
312+
return resource.RetryableError(fmt.Errorf("tke master node cvm instance %s in tke status is %s, retry...", instanceId, *resp.InstanceSet[0].InstanceState))
313313
}
314314

315315
return nil

0 commit comments

Comments
 (0)