Skip to content

Commit e5661a7

Browse files
authored
COS LOG enable & kubernetes cluster attachment support node extra_agrs (#571)
1 parent fc97b0c commit e5661a7

38 files changed

+363
-140
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
## 1.51.1 (Unreleased)
2+
3+
ENHANCEMENTS:
4+
5+
* Resource `tencentcloud_kubernetes_cluster_attachment` add `extra_args` to support node extra arguments setting.
6+
* Resource `tencentcloud_cos_bucket` add `log_enbale`, `log_target_bucket` and `log_prefix` to support log status setting.
7+
28
## 1.51.0 (December 15, 2020)
39

410
FEATURES:

tencentcloud/resource_tc_api_gateway_ip_strategy_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ func testApiIPStrategyDestroy(s *terraform.State) error {
6767
}
6868

6969
if has {
70-
return fmt.Errorf("[TECENT_TERRAFORM_CHECK][IP strategy][Destroy] check: IP strategy still exists: %s", rs.Primary.ID)
70+
return fmt.Errorf("[CHECK][IP strategy][Destroy] check: IP strategy still exists: %s", rs.Primary.ID)
7171
}
7272
}
7373
return nil
@@ -81,10 +81,10 @@ func testApiIPStrategyExists(n string) resource.TestCheckFunc {
8181

8282
rs, ok := s.RootModule().Resources[n]
8383
if !ok {
84-
return fmt.Errorf("[TECENT_TERRAFORM_CHECK][IP strategy][Exists] check: %s is not found", n)
84+
return fmt.Errorf("[CHECK][IP strategy][Exists] check: %s is not found", n)
8585
}
8686
if rs.Primary.ID == "" {
87-
return fmt.Errorf("[TECENT_TERRAFORM_CHECK][IP strategy][Exists] check: id is not set")
87+
return fmt.Errorf("[CHECK][IP strategy][Exists] check: id is not set")
8888
}
8989
idSplit := strings.Split(rs.Primary.ID, FILED_SP)
9090
if len(idSplit) != 2 {
@@ -98,7 +98,7 @@ func testApiIPStrategyExists(n string) resource.TestCheckFunc {
9898
}
9999

100100
if !has {
101-
return fmt.Errorf("[TECENT_TERRAFORM_CHECK][IP strategy][Exists] check: not exists: %s", rs.Primary.ID)
101+
return fmt.Errorf("[CHECK][IP strategy][Exists] check: not exists: %s", rs.Primary.ID)
102102
}
103103
return nil
104104
}

tencentcloud/resource_tc_api_gateway_strategy_attachment_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ func testApiStrategyAttachmentDestroy(s *terraform.State) error {
5858
}
5959

6060
if has {
61-
return fmt.Errorf("[TECENT_TERRAFORM_CHECK][IP strategy][Destroy] check: IP strategy still exists: %s", rs.Primary.ID)
61+
return fmt.Errorf("[CHECK][IP strategy][Destroy] check: IP strategy still exists: %s", rs.Primary.ID)
6262
}
6363
}
6464
return nil
@@ -72,10 +72,10 @@ func testApiStrategyAttachmentExists(n string) resource.TestCheckFunc {
7272

7373
rs, ok := s.RootModule().Resources[n]
7474
if !ok {
75-
return fmt.Errorf("[TECENT_TERRAFORM_CHECK][IP strategy][Exists] check: %s is not found", n)
75+
return fmt.Errorf("[CHECK][IP strategy][Exists] check: %s is not found", n)
7676
}
7777
if rs.Primary.ID == "" {
78-
return fmt.Errorf("[TECENT_TERRAFORM_CHECK][IP strategy][Exists] check: id is not set")
78+
return fmt.Errorf("[CHECK][IP strategy][Exists] check: id is not set")
7979
}
8080
idSplit := strings.Split(rs.Primary.ID, FILED_SP)
8181
if len(idSplit) != 4 {
@@ -90,7 +90,7 @@ func testApiStrategyAttachmentExists(n string) resource.TestCheckFunc {
9090
}
9191

9292
if !has {
93-
return fmt.Errorf("[TECENT_TERRAFORM_CHECK][IP strategy][Exists] check: not exists: %s", rs.Primary.ID)
93+
return fmt.Errorf("[CHECK][IP strategy][Exists] check: not exists: %s", rs.Primary.ID)
9494
}
9595
return nil
9696
}

tencentcloud/resource_tc_audit_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ func testAccCheckAuditDestroy(s *terraform.State) error {
108108
return err
109109
}
110110
if has {
111-
return fmt.Errorf("[TECENT_TERRAFORM_CHECK][Audit][Exists] id %s still exist", rs.Primary.ID)
111+
return fmt.Errorf("[CHECK][Audit][Exists] id %s still exist", rs.Primary.ID)
112112
}
113113
}
114114
return nil
@@ -121,10 +121,10 @@ func testAccCheckAuditExists(n string) resource.TestCheckFunc {
121121

122122
rs, ok := s.RootModule().Resources[n]
123123
if !ok {
124-
return fmt.Errorf("[TECENT_TERRAFORM_CHECK][Audit][Exists] check: Audit %s is not found", n)
124+
return fmt.Errorf("[CHECK][Audit][Exists] check: Audit %s is not found", n)
125125
}
126126
if rs.Primary.ID == "" {
127-
return fmt.Errorf("[TECENT_TERRAFORM_CHECK][Audit][Create] check: Audit id is not set")
127+
return fmt.Errorf("[CHECK][Audit][Create] check: Audit id is not set")
128128
}
129129
auditService := AuditService{
130130
client: testAccProvider.Meta().(*TencentCloudClient).apiV3Conn,
@@ -134,7 +134,7 @@ func testAccCheckAuditExists(n string) resource.TestCheckFunc {
134134
return err
135135
}
136136
if !has {
137-
return fmt.Errorf("[TECENT_TERRAFORM_CHECK][Audit][Exists] id %s is not exist", rs.Primary.ID)
137+
return fmt.Errorf("[CHECK][Audit][Exists] id %s is not exist", rs.Primary.ID)
138138
}
139139
return nil
140140
}

tencentcloud/resource_tc_cam_group_membership_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func testAccCheckCamGroupMembershipDestroy(s *terraform.State) error {
5353

5454
instance, err := camService.DescribeGroupMembershipById(ctx, rs.Primary.ID)
5555
if err == nil && len(instance) > 0 {
56-
return fmt.Errorf("[TECENT_TERRAFORM_CHECK][CAM group membership][Destroy] check: CAM group membership still exists: %s", rs.Primary.ID)
56+
return fmt.Errorf("[CHECK][CAM group membership][Destroy] check: CAM group membership still exists: %s", rs.Primary.ID)
5757
}
5858
}
5959
return nil
@@ -66,10 +66,10 @@ func testAccCheckCamGroupMembershipExists(n string) resource.TestCheckFunc {
6666

6767
rs, ok := s.RootModule().Resources[n]
6868
if !ok {
69-
return fmt.Errorf("[TECENT_TERRAFORM_CHECK][CAM group membership][Exists] check: CAM group membership %s is not found", n)
69+
return fmt.Errorf("[CHECK][CAM group membership][Exists] check: CAM group membership %s is not found", n)
7070
}
7171
if rs.Primary.ID == "" {
72-
return fmt.Errorf("[TECENT_TERRAFORM_CHECK][CAM group membership][Exists] check: CAM group membership id is not set")
72+
return fmt.Errorf("[CHECK][CAM group membership][Exists] check: CAM group membership id is not set")
7373
}
7474
camService := CamService{
7575
client: testAccProvider.Meta().(*TencentCloudClient).apiV3Conn,
@@ -79,7 +79,7 @@ func testAccCheckCamGroupMembershipExists(n string) resource.TestCheckFunc {
7979
return err
8080
}
8181
if len(instance) == 0 {
82-
return fmt.Errorf("[TECENT_TERRAFORM_CHECK][CAM group membership][Exists] check: CAM group membership %s is not exists", rs.Primary.ID)
82+
return fmt.Errorf("[CHECK][CAM group membership][Exists] check: CAM group membership %s is not exists", rs.Primary.ID)
8383
}
8484
return nil
8585
}

tencentcloud/resource_tc_cam_group_policy_attachment_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func testAccCheckCamGroupPolicyAttachmentDestroy(s *terraform.State) error {
4646

4747
instance, err := camService.DescribeGroupPolicyAttachmentById(ctx, rs.Primary.ID)
4848
if err == nil && instance != nil {
49-
return fmt.Errorf("[TECENT_TERRAFORM_CHECK][CAM group policy attachment][Destroy] check: CAM group policy attachment still exists: %s", rs.Primary.ID)
49+
return fmt.Errorf("[CHECK][CAM group policy attachment][Destroy] check: CAM group policy attachment still exists: %s", rs.Primary.ID)
5050
}
5151
}
5252
return nil
@@ -59,10 +59,10 @@ func testAccCheckCamGroupPolicyAttachmentExists(n string) resource.TestCheckFunc
5959

6060
rs, ok := s.RootModule().Resources[n]
6161
if !ok {
62-
return fmt.Errorf("[TECENT_TERRAFORM_CHECK][CAM group policy attachment][Exists] check: CAM group policy attachment %s is not found", n)
62+
return fmt.Errorf("[CHECK][CAM group policy attachment][Exists] check: CAM group policy attachment %s is not found", n)
6363
}
6464
if rs.Primary.ID == "" {
65-
return fmt.Errorf("[TECENT_TERRAFORM_CHECK][CAM group policy attachment][Exists] check: CAM group policy attachment id is not set")
65+
return fmt.Errorf("[CHECK][CAM group policy attachment][Exists] check: CAM group policy attachment id is not set")
6666
}
6767
camService := CamService{
6868
client: testAccProvider.Meta().(*TencentCloudClient).apiV3Conn,
@@ -72,7 +72,7 @@ func testAccCheckCamGroupPolicyAttachmentExists(n string) resource.TestCheckFunc
7272
return err
7373
}
7474
if instance == nil {
75-
return fmt.Errorf("[TECENT_TERRAFORM_CHECK][CAM group policy attachment][Exists] check: CAM group policy attachment %s is not exist", rs.Primary.ID)
75+
return fmt.Errorf("[CHECK][CAM group policy attachment][Exists] check: CAM group policy attachment %s is not exist", rs.Primary.ID)
7676
}
7777
return nil
7878
}

tencentcloud/resource_tc_cam_group_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func testAccCheckCamGroupDestroy(s *terraform.State) error {
5353

5454
instance, err := camService.DescribeGroupById(ctx, rs.Primary.ID)
5555
if err == nil && instance != nil {
56-
return fmt.Errorf("[TECENT_TERRAFORM_CHECK][CAM group][Destroy] check: CAM group still exists: %s", rs.Primary.ID)
56+
return fmt.Errorf("[CHECK][CAM group][Destroy] check: CAM group still exists: %s", rs.Primary.ID)
5757
}
5858

5959
}
@@ -67,10 +67,10 @@ func testAccCheckCamGroupExists(n string) resource.TestCheckFunc {
6767

6868
rs, ok := s.RootModule().Resources[n]
6969
if !ok {
70-
return fmt.Errorf("[TECENT_TERRAFORM_CHECK][CAM group][Exists] check: CAM group %s is not found", n)
70+
return fmt.Errorf("[CHECK][CAM group][Exists] check: CAM group %s is not found", n)
7171
}
7272
if rs.Primary.ID == "" {
73-
return fmt.Errorf("[TECENT_TERRAFORM_CHECK][CAM group][Exists] check: CAM group id is not set")
73+
return fmt.Errorf("[CHECK][CAM group][Exists] check: CAM group id is not set")
7474
}
7575
camService := CamService{
7676
client: testAccProvider.Meta().(*TencentCloudClient).apiV3Conn,
@@ -80,7 +80,7 @@ func testAccCheckCamGroupExists(n string) resource.TestCheckFunc {
8080
return err
8181
}
8282
if instance == nil {
83-
return fmt.Errorf("[TECENT_TERRAFORM_CHECK][CAM group][Exists] check: CAM group is not exist")
83+
return fmt.Errorf("[CHECK][CAM group][Exists] check: CAM group is not exist")
8484
}
8585
return nil
8686
}

tencentcloud/resource_tc_cam_policy_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func testAccCheckCamPolicyDestroy(s *terraform.State) error {
5454

5555
instance, err := camService.DescribePolicyById(ctx, rs.Primary.ID)
5656
if err == nil && (instance != nil && instance.Response != nil && instance.Response.PolicyName != nil) {
57-
return fmt.Errorf("[TECENT_TERRAFORM_CHECK][CAM policy][Desctroy] check: CAM policy still exists: %s", rs.Primary.ID)
57+
return fmt.Errorf("[CHECK][CAM policy][Desctroy] check: CAM policy still exists: %s", rs.Primary.ID)
5858
}
5959
}
6060
return nil
@@ -67,10 +67,10 @@ func testAccCheckCamPolicyExists(n string) resource.TestCheckFunc {
6767

6868
rs, ok := s.RootModule().Resources[n]
6969
if !ok {
70-
return fmt.Errorf("[TECENT_TERRAFORM_CHECK][CAM policy][Exists] check: CAM policy %s is not found", n)
70+
return fmt.Errorf("[CHECK][CAM policy][Exists] check: CAM policy %s is not found", n)
7171
}
7272
if rs.Primary.ID == "" {
73-
return fmt.Errorf("[TECENT_TERRAFORM_CHECK][CAM policy][Exists] check: CAM policy id is not set")
73+
return fmt.Errorf("[CHECK][CAM policy][Exists] check: CAM policy id is not set")
7474
}
7575
camService := CamService{
7676
client: testAccProvider.Meta().(*TencentCloudClient).apiV3Conn,
@@ -80,7 +80,7 @@ func testAccCheckCamPolicyExists(n string) resource.TestCheckFunc {
8080
return err
8181
}
8282
if instance == nil || instance.Response == nil || instance.Response.PolicyName == nil {
83-
return fmt.Errorf("[TECENT_TERRAFORM_CHECK][CAM policy][Exists] check: CAM policy %s is not exist", rs.Primary.ID)
83+
return fmt.Errorf("[CHECK][CAM policy][Exists] check: CAM policy %s is not exist", rs.Primary.ID)
8484
}
8585
return nil
8686
}

tencentcloud/resource_tc_cam_role_policy_attachment_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func testAccCheckCamRolePolicyAttachmentDestroy(s *terraform.State) error {
4646

4747
instance, err := camService.DescribeRolePolicyAttachmentById(ctx, rs.Primary.ID)
4848
if err == nil && instance != nil {
49-
return fmt.Errorf("[TECENT_TERRAFORM_CHECK][CAM role policy attachment][Desctroy] check: CAM role policy attachment still exists: %s", rs.Primary.ID)
49+
return fmt.Errorf("[CHECK][CAM role policy attachment][Desctroy] check: CAM role policy attachment still exists: %s", rs.Primary.ID)
5050
}
5151
}
5252
return nil
@@ -59,10 +59,10 @@ func testAccCheckCamRolePolicyAttachmentExists(n string) resource.TestCheckFunc
5959

6060
rs, ok := s.RootModule().Resources[n]
6161
if !ok {
62-
return fmt.Errorf("[TECENT_TERRAFORM_CHECK][CAM role policy attachment][Exist] check: CAM role policy attachment %s is not found", n)
62+
return fmt.Errorf("[CHECK][CAM role policy attachment][Exist] check: CAM role policy attachment %s is not found", n)
6363
}
6464
if rs.Primary.ID == "" {
65-
return fmt.Errorf("[TECENT_TERRAFORM_CHECK][CAM role policy attachment][Exist] check: CAM role policy attachment id is not set")
65+
return fmt.Errorf("[CHECK][CAM role policy attachment][Exist] check: CAM role policy attachment id is not set")
6666
}
6767
camService := CamService{
6868
client: testAccProvider.Meta().(*TencentCloudClient).apiV3Conn,
@@ -72,7 +72,7 @@ func testAccCheckCamRolePolicyAttachmentExists(n string) resource.TestCheckFunc
7272
return err
7373
}
7474
if instance == nil {
75-
return fmt.Errorf("[TECENT_TERRAFORM_CHECK][CAM role policy attachment][Exist] check: CAM role policy attachment %s is not exist", rs.Primary.ID)
75+
return fmt.Errorf("[CHECK][CAM role policy attachment][Exist] check: CAM role policy attachment %s is not exist", rs.Primary.ID)
7676
}
7777
return nil
7878
}

tencentcloud/resource_tc_cam_role_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func testAccCheckCamRoleDestroy(s *terraform.State) error {
5353

5454
instance, err := camService.DescribeRoleById(ctx, rs.Primary.ID)
5555
if err == nil && instance != nil {
56-
return fmt.Errorf("[TECENT_TERRAFORM_CHECK][CAM role][Destroy] check: CAM role still exists: %s", rs.Primary.ID)
56+
return fmt.Errorf("[CHECK][CAM role][Destroy] check: CAM role still exists: %s", rs.Primary.ID)
5757
}
5858
}
5959
return nil
@@ -66,10 +66,10 @@ func testAccCheckCamRoleExists(n string) resource.TestCheckFunc {
6666

6767
rs, ok := s.RootModule().Resources[n]
6868
if !ok {
69-
return fmt.Errorf("[TECENT_TERRAFORM_CHECK][CAM role][Exists] check: CAM role %s is not found", n)
69+
return fmt.Errorf("[CHECK][CAM role][Exists] check: CAM role %s is not found", n)
7070
}
7171
if rs.Primary.ID == "" {
72-
return fmt.Errorf("[TECENT_TERRAFORM_CHECK][CAM role][Exists] check: CAM role id is not set")
72+
return fmt.Errorf("[CHECK][CAM role][Exists] check: CAM role id is not set")
7373
}
7474
camService := CamService{
7575
client: testAccProvider.Meta().(*TencentCloudClient).apiV3Conn,
@@ -79,7 +79,7 @@ func testAccCheckCamRoleExists(n string) resource.TestCheckFunc {
7979
return err
8080
}
8181
if instance == nil {
82-
return fmt.Errorf("[TECENT_TERRAFORM_CHECK][CAM role][Exists] check: CAM role %s is not exist", rs.Primary.ID)
82+
return fmt.Errorf("[CHECK][CAM role][Exists] check: CAM role %s is not exist", rs.Primary.ID)
8383
}
8484
return nil
8585
}

0 commit comments

Comments
 (0)