Skip to content

Commit 9b6742e

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

File tree

2 files changed

+29
-16
lines changed

2 files changed

+29
-16
lines changed

tencentcloud/services/tke/resource_tc_kubernetes_native_node_pool.go

Lines changed: 0 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tencentcloud/services/tke/resource_tc_kubernetes_native_node_pool_extension.go

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,36 @@ package tke
22

33
import (
44
"context"
5+
6+
tccommon "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/common"
57
)
68

79
func resourceTencentCloudKubernetesNativeNodePoolReadPostHandleResponse0(ctx context.Context, resp *v20220501.NodePool) error {
8-
// TODO: implement me
9-
panic("TODO: implement me")
10+
d := tccommon.ResourceDataFromContext(ctx)
11+
meta := tccommon.ProviderMetaFromContext(ctx)
12+
13+
service := TkeService{client: meta.(tccommon.ProviderMeta).GetAPIV3Conn()}
14+
respData := resp
15+
annotationsList := make([]map[string]interface{}, 0, len(respData.Annotations))
16+
if respData.Annotations != nil {
17+
for _, annotations := range respData.Annotations {
18+
annotationsMap := map[string]interface{}{}
19+
20+
if annotations.Name != nil && tkeNativeNodePoolAnnotationsMap[*annotations.Name] != "" {
21+
continue
22+
}
23+
24+
if annotations.Name != nil {
25+
annotationsMap["name"] = annotations.Name
26+
}
27+
28+
if annotations.Value != nil {
29+
annotationsMap["value"] = annotations.Value
30+
}
31+
32+
annotationsList = append(annotationsList, annotationsMap)
33+
}
34+
35+
_ = d.Set("annotations", annotationsList)
36+
}
1037
}

0 commit comments

Comments
 (0)