1
1
/*
2
2
Provides a resource to create a CLB target group attachment is bound to the load balancing listener or forwarding rule.
3
3
4
- ~> **NOTE:** Required argument `targrt_group_id` is no longer supported, replace by `target_group_id`.
5
-
6
4
Example Usage
7
5
8
6
```hcl
@@ -54,7 +52,6 @@ import (
54
52
"context"
55
53
"fmt"
56
54
"strings"
57
- "time"
58
55
59
56
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
60
57
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
@@ -138,7 +135,7 @@ func resourceTencentCloudClbTargetGroupAttachmentCreate(d *schema.ResourceData,
138
135
targetGroupId = vTarget .(string )
139
136
}
140
137
} 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' " )
142
139
}
143
140
144
141
//check listenerId
@@ -236,10 +233,8 @@ func resourceTencentCloudClbTargetGroupAttachmentRead(d *schema.ResourceData, me
236
233
}
237
234
238
235
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 )
243
238
}
244
239
245
240
func resourceTencentCloudClbTargetGroupAttachmentDelete (d * schema.ResourceData , meta interface {}) error {
@@ -264,7 +259,6 @@ func resourceTencentCloudClbTargetGroupAttachmentDelete(d *schema.ResourceData,
264
259
if err := clbService .DisassociateTargetGroups (ctx , ids [0 ], ids [1 ], ids [2 ], ids [3 ]); err != nil {
265
260
return err
266
261
}
267
- time .Sleep (10 * time .Second )
268
262
269
263
// check status
270
264
err = resource .Retry (readRetryTimeout , func () * resource.RetryError {
0 commit comments