11/*
22Provides a resource to create a CLB target group attachment is bound to the load balancing listener or forwarding rule.
33
4- ~> **NOTE:** Required argument `targrt_group_id` is no longer supported, replace by `target_group_id`.
5-
64Example Usage
75
86```hcl
@@ -54,7 +52,6 @@ import (
5452 "context"
5553 "fmt"
5654 "strings"
57- "time"
5855
5956 "github.com/hashicorp/terraform-plugin-sdk/helper/resource"
6057 "github.com/hashicorp/terraform-plugin-sdk/helper/schema"
@@ -138,7 +135,7 @@ func resourceTencentCloudClbTargetGroupAttachmentCreate(d *schema.ResourceData,
138135 targetGroupId = vTarget .(string )
139136 }
140137 } else {
141- return fmt .Errorf ("'target_group_id' or 'targrt_group_id' at least one" )
138+ return fmt .Errorf ("'target_group_id' or 'targrt_group_id' at least set one, please use 'target_group_id' " )
142139 }
143140
144141 //check listenerId
@@ -236,10 +233,8 @@ func resourceTencentCloudClbTargetGroupAttachmentRead(d *schema.ResourceData, me
236233}
237234
238235func resourceTencentCloudClbTargetGroupAttachmentUpdate (d * schema.ResourceData , meta interface {}) error {
239- defer logElapsed ("resource.tencentcloud_clb_redirection.update" )()
240- defer inconsistentCheck (d , meta )()
241- // this nil update method works for the only filed `delete_all_auto_rewrite`
242- return resourceTencentCloudClbRedirectionRead (d , meta )
236+ defer logElapsed ("resource.tencentcloud_clb_target_group_attachment.update" )()
237+ return resourceTencentCloudClbTargetGroupAttachmentRead (d , meta )
243238}
244239
245240func resourceTencentCloudClbTargetGroupAttachmentDelete (d * schema.ResourceData , meta interface {}) error {
@@ -264,7 +259,6 @@ func resourceTencentCloudClbTargetGroupAttachmentDelete(d *schema.ResourceData,
264259 if err := clbService .DisassociateTargetGroups (ctx , ids [0 ], ids [1 ], ids [2 ], ids [3 ]); err != nil {
265260 return err
266261 }
267- time .Sleep (10 * time .Second )
268262
269263 // check status
270264 err = resource .Retry (readRetryTimeout , func () * resource.RetryError {
0 commit comments