Skip to content

Commit 2115a1a

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
2 parents 7b87853 + 9e22ba4 commit 2115a1a

File tree

3 files changed

+23
-13
lines changed

3 files changed

+23
-13
lines changed

CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
## 1.40.0 (Unreleased)
1+
## 1.40.1 (Unreleased)
2+
3+
FEATURES:
4+
5+
* **New Data Source**: `tencentcloud_vpc_acls`
6+
* **New Resource**: `tencentcloud_vpc_acl`
7+
* **New Resource**: `tencentcloud_vpc_acl_attachment`
8+
9+
## 1.40.0 (July 31, 2020)
210

311
FEATURES:
412

tencentcloud/resource_tc_vpc_acl_attachment.go

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@ package tencentcloud
33
import (
44
"context"
55
"fmt"
6-
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
7-
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
86
"log"
97
"strings"
108
"time"
9+
10+
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
11+
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
1112
)
1213

1314
func resourceTencentCloudVpcAclAttachment() *schema.Resource {
@@ -118,11 +119,12 @@ func resourceTencentCloudVpcAclAttachmentRead(d *schema.ResourceData, meta inter
118119

119120
func resourceTencentCloudVpcAclAttachmentDelete(d *schema.ResourceData, meta interface{}) error {
120121
defer logElapsed("resource.tencentcloud_acl_attachment.delete")()
121-
122-
logId := getLogId(contextNil)
123-
ctx := context.WithValue(context.TODO(), logIdKey, logId)
124-
service := VpcService{client: meta.(*TencentCloudClient).apiV3Conn}
125-
attachmentAcl := d.Id()
122+
var (
123+
logId = getLogId(contextNil)
124+
ctx = context.WithValue(context.TODO(), logIdKey, logId)
125+
service = VpcService{client: meta.(*TencentCloudClient).apiV3Conn}
126+
attachmentAcl = d.Id()
127+
)
126128

127129
err := resource.Retry(writeRetryTimeout, func() *resource.RetryError {
128130
e := service.DeleteAclAttachment(ctx, attachmentAcl)

tencentcloud/resource_tc_vpc_acl_attachment_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func TestAccTencentCloudVpcAclAttachment_basic(t *testing.T) {
1616
CheckDestroy: testVpcAclAttachmentDestroy,
1717
Steps: []resource.TestStep{
1818
{
19-
Config: testAccCamGroupPolicyAttachment_basic,
19+
Config: testAclAttachment_basic,
2020
Check: resource.ComposeTestCheckFunc(
2121
testVpcAclAttachmentExists("tencentcloud_vpc_acl_attachment.attachment"),
2222
resource.TestCheckResourceAttrSet("tencentcloud_vpc_acl_attachment.attachment", "id"),
@@ -65,9 +65,9 @@ func testVpcAclAttachmentExists(n string) resource.TestCheckFunc {
6565
}
6666
}
6767

68-
const testAccCamGroupPolicyAttachment_basic = `
68+
const testAclAttachment_basic = `
6969
resource "tencentcloud_vpc" "foo" {
70-
name = "guagua_vpc_instance_test"
70+
name = "vpc_instance_test"
7171
cidr_block = "10.0.0.0/16"
7272
}
7373
@@ -76,8 +76,8 @@ data "tencentcloud_vpc_instances" "id_instances" {
7676
}
7777
7878
resource "tencentcloud_vpc_acl" "foo" {
79-
vpc_id = data.tencentcloud_vpc_instances.default.instance_list.0.vpc_id
80-
name = "test_acl_gogoowang"
79+
vpc_id = data.tencentcloud_vpc_instances.default.instance_list.0.vpc_id
80+
name = "test_acl"
8181
ingress = [
8282
"ACCEPT#192.168.1.0/24#800#TCP",
8383
"ACCEPT#192.168.1.0/24#800-900#TCP",

0 commit comments

Comments
 (0)