@@ -24,7 +24,6 @@ import (
2424 "context"
2525 "github.com/hashicorp/terraform-plugin-sdk/helper/schema"
2626 clb "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/clb/v20180317"
27- "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper"
2827)
2928
3029func resourceTencentCloudClbTargetGroup () * schema.Resource {
@@ -60,7 +59,7 @@ func resourceTencentCloudClbTargetGroup() *schema.Resource {
6059 Type : schema .TypeList ,
6160 Optional : true ,
6261 Description : "The backend server of target group bind." ,
63- Elem : schema.Resource {
62+ Elem : & schema.Resource {
6463 Schema : map [string ]* schema.Schema {
6564 "bind_ip" : {
6665 Type : schema .TypeString ,
@@ -112,14 +111,14 @@ func resourceTencentCloudClbTargetCreate(d *schema.ResourceData, meta interface{
112111 for _ , v1 := range targetGroupInstances {
113112 value := v1 .(map [string ]interface {})
114113 bindIP := value ["bind_ip" ].(string )
115- port := helper . Uint64 ( uint64 (value ["port" ].(int ) ))
116- weight := helper . Uint64 ( uint64 (value ["weight" ].(int ) ))
117- newPort := helper . Uint64 ( uint64 (value ["new_port" ].(int ) ))
114+ port := uint64 (value ["port" ].(int ))
115+ weight := uint64 (value ["weight" ].(int ))
116+ newPort := uint64 (value ["new_port" ].(int ))
118117 tgtGrp := & clb.TargetGroupInstance {
119118 BindIP : & bindIP ,
120- Port : port ,
121- Weight : weight ,
122- NewPort : newPort ,
119+ Port : & port ,
120+ Weight : & weight ,
121+ NewPort : & newPort ,
123122 }
124123 insAttachments = append (insAttachments , tgtGrp )
125124 }
0 commit comments