Skip to content

Commit 9ce46e0

Browse files
committed
refactor(tke): regen tke provider
1 parent 9b6742e commit 9ce46e0

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

tencentcloud/services/tke/resource_tc_kubernetes_native_node_pool_extension.go

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package tke
22

33
import (
44
"context"
5+
"encoding/base64"
56

67
tccommon "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/common"
78
)
@@ -12,6 +13,25 @@ func resourceTencentCloudKubernetesNativeNodePoolReadPostHandleResponse0(ctx con
1213

1314
service := TkeService{client: meta.(tccommon.ProviderMeta).GetAPIV3Conn()}
1415
respData := resp
16+
17+
lifecycleMap := map[string]interface{}{}
18+
nativeMap = d.Get("native").([]interface{}).(map[string]interface{})
19+
20+
if respData.Native.Lifecycle != nil {
21+
if respData.Native.Lifecycle.PreInit != nil {
22+
lifecycleMap["pre_init"] = base64.StdEncoding.EncodeToString([]byte(*respData.Native.Lifecycle.PreInit))
23+
//lifecycleMap["pre_init"] = respData.Native.Lifecycle.PreInit
24+
}
25+
26+
if respData.Native.Lifecycle.PostInit != nil {
27+
lifecycleMap["post_init"] = base64.StdEncoding.EncodeToString([]byte(*respData.Native.Lifecycle.PostInit))
28+
//lifecycleMap["post_init"] = respData.Native.Lifecycle.PostInit
29+
}
30+
31+
nativeMap["lifecycle"] = []interface{}{lifecycleMap}
32+
}
33+
_ = d.Set("native", []interface{}{nativeMap})
34+
1535
annotationsList := make([]map[string]interface{}, 0, len(respData.Annotations))
1636
if respData.Annotations != nil {
1737
for _, annotations := range respData.Annotations {

0 commit comments

Comments
 (0)