Skip to content

Commit 5b71c20

Browse files
author
“guojunchu”
committed
fix fmt
1 parent 4f957e2 commit 5b71c20

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

tencentcloud/resource_tc_clb_target_group_attachment.go

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
/*
22
Provides 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-
64
Example 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

238235
func 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

245240
func 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 {

website/docs/r/clb_target_group_attachment.html.markdown

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ description: |-
1111

1212
Provides a resource to create a CLB target group attachment is bound to the load balancing listener or forwarding rule.
1313

14-
~> **NOTE:** Required argument `targrt_group_id` is no longer supported, replace by `target_group_id`.
15-
1614
## Example Usage
1715

1816
```hcl

0 commit comments

Comments
 (0)