Skip to content

Commit 6825c87

Browse files
committed
chore: update changelog and format code
1 parent 6a5de47 commit 6825c87

6 files changed

+62
-42
lines changed

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
## 1.59.4 (September 28, 2021)
2+
3+
ENHANCEMENTS:
4+
5+
* Resource `resource_tc_kubernetes_node_pool_test.go` extend relative auto-scaling group arguments in node pool resource
6+
7+
DEPRECATED:
8+
9+
* Resource `resource_tc_cam_group_membership.go` argument `user_ids` was deprecated, replace by `user_names`
10+
* Resource `resource_tc_cam_user_policy_attachment.go` argument `user_id` was deprecated, replace by `user_name`
11+
12+
13+
## 1.59.3 (September 24, 2021)
14+
15+
BUGFIXES:
16+
* Resource `resource_tc_tcr_instance.go` support modify tags
17+
* Resource `service_tencentcloud_postgresql.go` support security group
18+
* Resource `service_tencentcloud_monitor.go` fix binding policy query limit
19+
* Resource `resource_tc_api_gateway_api.go` fix destroy limitNumber
20+
21+
122
## 1.59.2 (September 18, 2021)
223

324
BUGFIXES:

tencentcloud/data_source_tc_cam_group_memberships.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func dataSourceTencentCloudCamGroupMemberships() *schema.Resource {
5252
Elem: &schema.Schema{
5353
Type: schema.TypeString,
5454
},
55-
Deprecated: "It has been deprecated from version 1.59.5. Use `user_names` instead.",
55+
Deprecated: "It has been deprecated from version 1.59.5. Use `user_names` instead.",
5656
Description: "ID set of the CAM group members.",
5757
},
5858
"user_names": {
@@ -96,8 +96,8 @@ func dataSourceTencentCloudCamGroupMembershipsRead(d *schema.ResourceData, meta
9696
groupList := make([]map[string]interface{}, 0, 1)
9797
ids := make([]string, 0, 1)
9898
mapping := map[string]interface{}{
99-
"group_id": groupId,
100-
"user_ids": memberships,
99+
"group_id": groupId,
100+
"user_ids": memberships,
101101
"user_names": memberships,
102102
}
103103
groupList = append(groupList, mapping)

tencentcloud/resource_tc_cam_group_membership.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,18 +50,18 @@ func resourceTencentCloudCamGroupMembership() *schema.Resource {
5050
Description: "ID of CAM group.",
5151
},
5252
"user_ids": {
53-
Type: schema.TypeSet,
54-
Optional: true,
53+
Type: schema.TypeSet,
54+
Optional: true,
5555
AtLeastOneOf: []string{"user_ids", "user_names"},
5656
Elem: &schema.Schema{
5757
Type: schema.TypeString,
5858
},
59-
Deprecated: "It has been deprecated from version 1.59.5. Use `user_names` instead.",
59+
Deprecated: "It has been deprecated from version 1.59.5. Use `user_names` instead.",
6060
Description: "ID set of the CAM group members.",
6161
},
6262
"user_names": {
63-
Type: schema.TypeSet,
64-
Optional: true,
63+
Type: schema.TypeSet,
64+
Optional: true,
6565
AtLeastOneOf: []string{"user_ids", "user_names"},
6666
Elem: &schema.Schema{
6767
Type: schema.TypeString,
@@ -375,4 +375,4 @@ func processChange(d *schema.ResourceData, groupId string, logId string, meta in
375375
}
376376
}
377377
return nil
378-
}
378+
}

tencentcloud/resource_tc_cam_user_policy_attachment.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,19 +43,19 @@ func resourceTencentCloudCamUserPolicyAttachment() *schema.Resource {
4343

4444
Schema: map[string]*schema.Schema{
4545
"user_id": {
46-
Type: schema.TypeString,
47-
Optional: true,
48-
ForceNew: true,
46+
Type: schema.TypeString,
47+
Optional: true,
48+
ForceNew: true,
4949
AtLeastOneOf: []string{"user_name", "user_id"},
50-
Deprecated: "It has been deprecated from version 1.59.5. Use `user_name` instead.",
51-
Description: "ID of the attached CAM user.",
50+
Deprecated: "It has been deprecated from version 1.59.5. Use `user_name` instead.",
51+
Description: "ID of the attached CAM user.",
5252
},
5353
"user_name": {
54-
Type: schema.TypeString,
55-
Optional: true,
56-
ForceNew: true,
54+
Type: schema.TypeString,
55+
Optional: true,
56+
ForceNew: true,
5757
AtLeastOneOf: []string{"user_name", "user_id"},
58-
Description: "Name of the attached CAM user as uniq key.",
58+
Description: "Name of the attached CAM user as uniq key.",
5959
},
6060
"policy_id": {
6161
Type: schema.TypeString,
@@ -218,4 +218,4 @@ func getUserId(d *schema.ResourceData) (value string, usingName bool, err error)
218218
return id.(string), false, nil
219219
}
220220
return "", false, fmt.Errorf("no user name provided")
221-
}
221+
}

tencentcloud/resource_tc_kubernetes_node_pool.go

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -636,11 +636,11 @@ func resourceKubernetesNodePoolRead(d *schema.ResourceData, meta interface{}) er
636636
defer logElapsed("resource.tencentcloud_kubernetes_node_pool.read")()
637637

638638
var (
639-
logId = getLogId(contextNil)
640-
ctx = context.WithValue(context.TODO(), logIdKey, logId)
641-
service = TkeService{client: meta.(*TencentCloudClient).apiV3Conn}
639+
logId = getLogId(contextNil)
640+
ctx = context.WithValue(context.TODO(), logIdKey, logId)
641+
service = TkeService{client: meta.(*TencentCloudClient).apiV3Conn}
642642
asService = AsService{client: meta.(*TencentCloudClient).apiV3Conn}
643-
items = strings.Split(d.Id(), FILED_SP)
643+
items = strings.Split(d.Id(), FILED_SP)
644644
)
645645
if len(items) != 2 {
646646
return fmt.Errorf("resource_tc_kubernetes_node_pool id is broken")
@@ -849,11 +849,11 @@ func resourceKubernetesNodePoolUpdate(d *schema.ResourceData, meta interface{})
849849
defer logElapsed("resource.tencentcloud_kubernetes_node_pool.update")()
850850

851851
var (
852-
logId = getLogId(contextNil)
853-
ctx = context.WithValue(context.TODO(), logIdKey, logId)
854-
service = TkeService{client: meta.(*TencentCloudClient).apiV3Conn}
852+
logId = getLogId(contextNil)
853+
ctx = context.WithValue(context.TODO(), logIdKey, logId)
854+
service = TkeService{client: meta.(*TencentCloudClient).apiV3Conn}
855855
asService = AsService{client: meta.(*TencentCloudClient).apiV3Conn}
856-
items = strings.Split(d.Id(), FILED_SP)
856+
items = strings.Split(d.Id(), FILED_SP)
857857
)
858858
if len(items) != 2 {
859859
return fmt.Errorf("resource_tc_kubernetes_node_pool id is broken")
@@ -904,9 +904,9 @@ func resourceKubernetesNodePoolUpdate(d *schema.ResourceData, meta interface{})
904904
}
905905

906906
var (
907-
scalingGroupId = *nodePool.AutoscalingGroupId
907+
scalingGroupId = *nodePool.AutoscalingGroupId
908908
name = d.Get("scaling_group_name").(string)
909-
projectId = d.Get("scaling_group_project_id").(int)
909+
projectId = d.Get("scaling_group_project_id").(int)
910910
defaultCooldown = d.Get("default_cooldown").(int)
911911
zones []*string
912912
terminationPolicy []*string
@@ -924,7 +924,6 @@ func resourceKubernetesNodePoolUpdate(d *schema.ResourceData, meta interface{})
924924
}
925925
}
926926

927-
928927
err = resource.Retry(writeRetryTimeout, func() *resource.RetryError {
929928
errRet := asService.ModifyScalingGroup(ctx, scalingGroupId, name, projectId, defaultCooldown, zones, terminationPolicy)
930929
if errRet != nil {

tencentcloud/resource_tc_postgresql_instance.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -215,19 +215,19 @@ func resourceTencentCloudPostgresqlInstanceCreate(d *schema.ResourceData, meta i
215215
postgresqlService := PostgresqlService{client: meta.(*TencentCloudClient).apiV3Conn}
216216

217217
var (
218-
name = d.Get("name").(string)
219-
dbVersion = d.Get("engine_version").(string)
220-
payType = d.Get("charge_type").(string)
221-
projectId = d.Get("project_id").(int)
222-
subnetId = d.Get("subnet_id").(string)
223-
vpcId = d.Get("vpc_id").(string)
218+
name = d.Get("name").(string)
219+
dbVersion = d.Get("engine_version").(string)
220+
payType = d.Get("charge_type").(string)
221+
projectId = d.Get("project_id").(int)
222+
subnetId = d.Get("subnet_id").(string)
223+
vpcId = d.Get("vpc_id").(string)
224224
securityGroups = d.Get("security_groups").(*schema.Set).List()
225-
zone = d.Get("availability_zone").(string)
226-
storage = d.Get("storage").(int)
227-
memory = d.Get("memory").(int)
228-
username = d.Get("root_user").(string)
229-
password = d.Get("root_password").(string)
230-
charset = d.Get("charset").(string)
225+
zone = d.Get("availability_zone").(string)
226+
storage = d.Get("storage").(int)
227+
memory = d.Get("memory").(int)
228+
username = d.Get("root_user").(string)
229+
password = d.Get("root_password").(string)
230+
charset = d.Get("charset").(string)
231231
)
232232

233233
var period = 1

0 commit comments

Comments
 (0)