Skip to content

Commit 7261411

Browse files
author
“guojunchu”
committed
Merge remote-tracking branch 'origin/master'
# Conflicts: # tencentcloud/data_source_tc_vpc_acls.go # tencentcloud/resource_tc_vpc_acl.go # tencentcloud/service_tencentcloud_vpc.go
1 parent e941777 commit 7261411

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

tencentcloud/resource_tc_vpc_acl_attachment.go

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func resourceTencentCloudVpcAclAttachment() *schema.Resource {
5757
Type: schema.TypeString,
5858
Required: true,
5959
ForceNew: true,
60-
Description: " the Subnet instance ID.",
60+
Description: "The Subnet instance ID.",
6161
},
6262
},
6363
}
@@ -69,17 +69,12 @@ func resourceTencentCloudVpcAclAttachmentCreate(d *schema.ResourceData, meta int
6969
logId = getLogId(contextNil)
7070
ctx = context.WithValue(context.TODO(), logIdKey, logId)
7171
service = VpcService{client: meta.(*TencentCloudClient).apiV3Conn}
72-
aclId string
7372
subnetIds []string
74-
subnetId string
7573
)
7674

77-
if temp, ok := d.GetOk("acl_id"); ok {
78-
aclId = temp.(string)
79-
}
80-
if temp, ok := d.GetOk("subnet_id"); ok {
81-
subnetId = temp.(string)
82-
}
75+
aclId := d.Get("acl_id").(string)
76+
subnetId := d.Get("acl_id").(string)
77+
8378
subnetIds = append(subnetIds, subnetId)
8479

8580
err := service.AssociateAclSubnets(ctx, aclId, subnetIds)

tencentcloud/service_tencentcloud_vpc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3217,7 +3217,7 @@ func (me *VpcService) DescribeByAclId(ctx context.Context, attachmentAcl string)
32173217
}()
32183218

32193219
if attachmentAcl == "" {
3220-
errRet = fmt.Errorf("DeleteRouteTable can not invoke by empty routeTableId.")
3220+
errRet = fmt.Errorf("DisassociateNetworkAclSubnets can not invoke by empty routeTableId.")
32213221
return
32223222
}
32233223

0 commit comments

Comments
 (0)