Skip to content

Commit 25b6e68

Browse files
authored
fix/cos-domain-404 (#774)
* fix: skip cos domain set if returns expected 404 * chore: reformat code
1 parent e225069 commit 25b6e68

15 files changed

+41
-28
lines changed

tencentcloud/data_source_tc_kubernetes_charts.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ package tencentcloud
1212
import (
1313
"context"
1414
"encoding/json"
15+
1516
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
1617
tke "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525"
1718
"github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper"

tencentcloud/data_source_tc_kubernetes_charts_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ func TestAccTencentCloudKubernetesChartsDataSource(t *testing.T) {
2323
})
2424
}
2525

26-
2726
const testAccDataSourceKubernetesCharts = `
2827
data "tencentcloud_kubernetes_charts" "test" {
2928
}
30-
`
29+
`

tencentcloud/extension_tke.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,4 +119,4 @@ var TKE_ADDON_DEFAULT_VALUES_KEY = []string{
119119
"global.cluster.clustertype",
120120
"global.cluster.kubeversion",
121121
"global.cluster.kubeminor",
122-
}
122+
}

tencentcloud/resource_tc_clb_customized_config.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,13 @@ package tencentcloud
2525

2626
import (
2727
"context"
28+
"log"
29+
2830
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
2931
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
3032
"github.com/pkg/errors"
3133
clb "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/clb/v20180317"
3234
"github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper"
33-
"log"
3435
)
3536

3637
func resourceTencentCloudClbCustomizedConfig() *schema.Resource {

tencentcloud/resource_tc_clb_log_set.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@ package tencentcloud
2222
import (
2323
"context"
2424
"fmt"
25+
"time"
26+
2527
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
2628
cls "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cls/v20201016"
2729
"github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper"
28-
"time"
2930
)
3031

3132
func resourceTencentCloudClbLogSet() *schema.Resource {

tencentcloud/resource_tc_eks_container_instance.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ package tencentcloud
8787
import (
8888
"context"
8989
"fmt"
90+
9091
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
9192
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
9293
tke "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525"

tencentcloud/resource_tc_eks_container_instance_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ package tencentcloud
33
import (
44
"context"
55
"fmt"
6+
"testing"
7+
68
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
79
"github.com/hashicorp/terraform-plugin-sdk/terraform"
8-
"testing"
910
)
1011

1112
func TestAccTencentCloudEKSContainerInstance_basic(t *testing.T) {

tencentcloud/resource_tc_kubernetes_addon_attachment.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,11 @@ package tencentcloud
7474
import (
7575
"context"
7676
"fmt"
77-
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
78-
"github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper"
7977
"log"
8078
"strings"
79+
80+
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
81+
"github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper"
8182
)
8283

8384
func resourceTencentCloudTkeAddonAttachment() *schema.Resource {
@@ -121,9 +122,9 @@ func resourceTencentCloudTkeAddonAttachment() *schema.Resource {
121122
Description: "Addon response body.",
122123
},
123124
"status": {
124-
Type: schema.TypeMap,
125-
Computed: true,
126-
Description: "Addon current status.",
125+
Type: schema.TypeMap,
126+
Computed: true,
127+
Description: "Addon current status.",
127128
},
128129
},
129130
Create: resourceTencentCloudTkeAddonAttachmentCreate,
@@ -209,13 +210,12 @@ func resourceTencentCloudTkeAddonAttachmentRead(d *schema.ResourceData, meta int
209210
addonName := split[1]
210211

211212
var (
212-
err error
213-
response string
213+
err error
214+
response string
214215
addonResponseData = &AddonResponseData{}
215-
status = make(map[string]*string)
216+
status = make(map[string]*string)
216217
)
217218

218-
219219
_, has, err = service.PollingAddonsPhase(ctx, clusterId, addonName, addonResponseData)
220220

221221
if err != nil || !has {
@@ -300,7 +300,7 @@ func resourceTencentCloudTkeAddonAttachmentDelete(d *schema.ResourceData, meta i
300300
split = strings.Split(id, FILED_SP)
301301
clusterId = split[0]
302302
addonName = split[1]
303-
has bool
303+
has bool
304304
)
305305

306306
if err := service.DeleteExtensionAddon(ctx, clusterId, addonName); err != nil {
@@ -330,4 +330,4 @@ func getFilteredValues(d *schema.ResourceData, values []*string) []string {
330330
rawValues = append(rawValues, *value)
331331
}
332332
return rawValues
333-
}
333+
}

tencentcloud/resource_tc_kubernetes_cluster.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -993,9 +993,9 @@ func resourceTencentCloudTkeCluster() *schema.Resource {
993993
Description: "Vpc Id of the cluster.",
994994
},
995995
"cluster_internet": {
996-
Type: schema.TypeBool,
997-
Default: false,
998-
Optional: true,
996+
Type: schema.TypeBool,
997+
Default: false,
998+
Optional: true,
999999
Description: "Open internet access or not." +
10001000
" If this field is set 'true', the field below `worker_config` must be set." +
10011001
" Because only cluster with node is allowed enable access endpoint.",

tencentcloud/resource_tc_redis_instance.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,10 @@ func resourceTencentCloudRedisInstance() *schema.Resource {
160160
Description: "Password for a Redis user, which should be 8 to 16 characters. NOTE: Only `no_auth=true` specified can make password empty.",
161161
},
162162
"no_auth": {
163-
Type: schema.TypeBool,
164-
Optional: true,
165-
ForceNew: true,
166-
Description: "Indicates whether the redis instance support no-auth access. NOTE: Only available in private cloud environment.",
163+
Type: schema.TypeBool,
164+
Optional: true,
165+
ForceNew: true,
166+
Description: "Indicates whether the redis instance support no-auth access. NOTE: Only available in private cloud environment.",
167167
},
168168
"mem_size": {
169169
Type: schema.TypeInt,

0 commit comments

Comments
 (0)