Skip to content

Commit b96abb2

Browse files
authored
Merge pull request #740 from tencentcloudstack/feat/eks-instance
New Resource: tencentcloud_eks_container_instance
2 parents a8ee2f4 + 3d1c949 commit b96abb2

12 files changed

+1617
-9
lines changed

tencentcloud/data_source_tc_availability_zones_by_product.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func dataSourceTencentCloudAvailabilityZonesByProduct() *schema.Resource {
3636
"product": {
3737
Type: schema.TypeString,
3838
Required: true,
39-
Description: "A string variable indicates that the query will use product infomation.",
39+
Description: "A string variable indicates that the query will use product information.",
4040
},
4141
"include_unavailable": {
4242
Type: schema.TypeBool,

tencentcloud/internal/helper/transform.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ func InterfacesIntInt64Point(configured []interface{}) []*int64 {
8585
return vs
8686
}
8787

88-
// Flatten to an array of raw strings and returns a []interface{}
88+
// StringsInterfaces Flatten to an array of raw strings and returns a []interface{}
8989
func StringsInterfaces(list []*string) []interface{} {
9090
vs := make([]interface{}, 0, len(list))
9191
for _, v := range list {

tencentcloud/provider.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,7 @@ Tencent Kubernetes Engine(TKE)
328328
tencentcloud_kubernetes_cluster_attachment
329329
tencentcloud_kubernetes_node_pool
330330
tencentcloud_eks_cluster
331+
tencentcloud_eks_container_instance
331332
tencentcloud_kubernetes_auth_attachment
332333
333334
TDMQ
@@ -877,7 +878,8 @@ func Provider() terraform.ResourceProvider {
877878
"tencentcloud_container_cluster": resourceTencentCloudContainerCluster(),
878879
"tencentcloud_container_cluster_instance": resourceTencentCloudContainerClusterInstance(),
879880
"tencentcloud_kubernetes_cluster": resourceTencentCloudTkeCluster(),
880-
"tencentcloud_eks_cluster": resourceTencentcloudEksCluster(),
881+
"tencentcloud_eks_cluster": resourceTencentCloudEksCluster(),
882+
"tencentcloud_eks_container_instance": resourceTencentCloudEksContainerInstance(),
881883
"tencentcloud_kubernetes_auth_attachment": resourceTencentCloudTKEAuthAttachment(),
882884
"tencentcloud_kubernetes_as_scaling_group": ResourceTencentCloudKubernetesAsScalingGroup(),
883885
"tencentcloud_kubernetes_scale_worker": resourceTencentCloudTkeScaleWorker(),

tencentcloud/resource_tc_clb_instance_topic_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,13 @@ func testAccCheckClbInstanceTopicExists(n string) resource.TestCheckFunc {
4343
clsService := ClsService{
4444
client: testAccProvider.Meta().(*TencentCloudClient).apiV3Conn,
4545
}
46-
topicName := rs.Primary.Attributes["topic_name"]
47-
instance, err := clsService.DeleteTopicsByTopicName(ctx, topicName)
46+
47+
instance, err := clsService.DescribeTopicsById(ctx, rs.Primary.ID)
48+
4849
if err != nil {
4950
return err
5051
}
52+
5153
if instance == nil {
5254
return fmt.Errorf("[CHECK][CLB topic][Exists] id %s is not exist", rs.Primary.ID)
5355
}

tencentcloud/resource_tc_eks_cluster.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ import (
6565
"github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper"
6666
)
6767

68-
func resourceTencentcloudEksCluster() *schema.Resource {
68+
func resourceTencentCloudEksCluster() *schema.Resource {
6969
return &schema.Resource{
7070
Read: resourceTencentcloudEKSClusterRead,
7171
Create: resourceTencentcloudEKSClusterCreate,

tencentcloud/resource_tc_eks_cluster_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ import (
1212
func TestAccTencentCloudEKSCluster_basic(t *testing.T) {
1313
t.Parallel()
1414

15-
fmt.Printf("file====:\n$%s", testAccEksCluster)
16-
1715
resource.Test(t, resource.TestCase{
1816
PreCheck: func() { testAccPreCheck(t) },
1917
Providers: testAccProviders,

0 commit comments

Comments
 (0)