Skip to content

Commit 1d473bb

Browse files
committed
style: fmt
1 parent 4640fe7 commit 1d473bb

File tree

84 files changed

+985
-885
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+985
-885
lines changed

tencentcloud/common.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,21 +46,21 @@ var logFirstTime = ""
4646
var logAtomicId int64 = 0
4747

4848
// readRetryTimeout is read retry timeout
49-
//const readRetryTimeout = 3 * time.Minute
49+
// const readRetryTimeout = 3 * time.Minute
5050
var readRetry = getEnvDefault(PROVIDER_READ_RETRY_TIMEOUT, 3)
5151
var readRetryTimeout = time.Duration(readRetry) * time.Minute
5252

5353
// writeRetryTimeout is write retry timeout
54-
//const writeRetryTimeout = 5 * time.Minute
54+
// const writeRetryTimeout = 5 * time.Minute
5555
var writeRetry = getEnvDefault(PROVIDER_WRITE_RETRY_TIMEOUT, 5)
5656
var writeRetryTimeout = time.Duration(writeRetry) * time.Minute
5757

5858
// writeRetryTimeout is write retry timeout
59-
//const writeRetryTimeout = 5 * time.Minute
59+
// const writeRetryTimeout = 5 * time.Minute
6060
var waitRead = getEnvDefault(PROVIDER_WAIT_READ_TIMEOUT, 1)
6161
var waitReadTimeout = time.Duration(waitRead) * time.Second
6262

63-
//const writeRetryTimeout = 5 * time.Minute
63+
// const writeRetryTimeout = 5 * time.Minute
6464
var needProtect = getEnvDefault(SWEEPER_NEED_PROTECT, 0)
6565

6666
// InternalError common internalError, do not add in retryableErrorCode,
@@ -505,7 +505,7 @@ func GetListDiffs(o []int, n []int) (adds []int, lacks []int) {
505505
return
506506
}
507507

508-
//GoRoutine Limit
508+
// GoRoutine Limit
509509
type GoRoutineLimit struct {
510510
Count int
511511
Chan chan struct{}

tencentcloud/data_source_tc_cam_list_attached_user_policy.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
/*
22
Use this data source to query detailed information of cam list_attached_user_policy
33
4-
Example Usage
4+
# Example Usage
55
66
```hcl
7-
data "tencentcloud_cam_list_attached_user_policy" "list_attached_user_policy" {
8-
target_uin = 100032767426
9-
attach_type = 0
10-
}
7+
8+
data "tencentcloud_cam_list_attached_user_policy" "list_attached_user_policy" {
9+
target_uin = 100032767426
10+
attach_type = 0
11+
}
12+
1113
```
1214
*/
1315
package tencentcloud

tencentcloud/data_source_tc_eks_cluster_credential.go

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,35 @@ Provide a datasource to query EKS cluster credential info (offlined).
33
44
~> **NOTE:** This resource was offline no longer supported.
55
6-
Example Usage
6+
# Example Usage
77
88
```hcl
9-
data "tencentcloud_eks_cluster_credential" "foo" {
10-
cluster_id = "cls-xxxxxxxx"
11-
}
9+
10+
data "tencentcloud_eks_cluster_credential" "foo" {
11+
cluster_id = "cls-xxxxxxxx"
12+
}
1213
1314
# example outputs
14-
output "addresses" {
15-
value = data.tencentcloud_eks_cluster_credential.cred.addresses
16-
}
1715
18-
output "ca_cert" {
19-
value = data.tencentcloud_eks_cluster_credential.cred.credential.ca_cert
20-
}
16+
output "addresses" {
17+
value = data.tencentcloud_eks_cluster_credential.cred.addresses
18+
}
2119
22-
output "token" {
23-
value = data.tencentcloud_eks_cluster_credential.cred.credential.token
24-
}
20+
output "ca_cert" {
21+
value = data.tencentcloud_eks_cluster_credential.cred.credential.ca_cert
22+
}
2523
26-
output "public_lb_param" {
27-
value = data.tencentcloud_eks_cluster_credential.cred.public_lb.0.extra_param
28-
}
24+
output "token" {
25+
value = data.tencentcloud_eks_cluster_credential.cred.credential.token
26+
}
2927
30-
output "internal_lb_subnet" {
31-
value = data.tencentcloud_eks_cluster_credential.cred.internal_lb.0.subnet_id
32-
}
28+
output "public_lb_param" {
29+
value = data.tencentcloud_eks_cluster_credential.cred.public_lb.0.extra_param
30+
}
31+
32+
output "internal_lb_subnet" {
33+
value = data.tencentcloud_eks_cluster_credential.cred.internal_lb.0.subnet_id
34+
}
3335
3436
```
3537
*/

tencentcloud/data_source_tc_eks_clusters.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@ Use this data source to query elastic kubernetes cluster resource (offlined).
33
44
~> **NOTE:** This resource was offline and no longer supported.
55
6-
Example Usage
6+
# Example Usage
77
88
```
9-
data "tencentcloud_eks_clusters" "foo" {
10-
cluster_id = "cls-xxxxxxxx"
11-
}
9+
10+
data "tencentcloud_eks_clusters" "foo" {
11+
cluster_id = "cls-xxxxxxxx"
12+
}
13+
1214
```
1315
*/
1416
package tencentcloud

tencentcloud/data_source_tc_monitor_statistic_data.go

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
/*
22
Use this data source to query detailed information of monitor statistic_data
33
4-
Example Usage
4+
# Example Usage
55
66
```hcl
7-
data "tencentcloud_monitor_statistic_data" "statistic_data" {
8-
module = "monitor"
9-
namespace = "QCE/TKE2"
10-
metric_names = ["cpu_usage"]
11-
conditions {
12-
key = "tke_cluster_instance_id"
13-
operator = "="
14-
value = ["cls-mw2w40s7"]
15-
}
16-
}
7+
8+
data "tencentcloud_monitor_statistic_data" "statistic_data" {
9+
module = "monitor"
10+
namespace = "QCE/TKE2"
11+
metric_names = ["cpu_usage"]
12+
conditions {
13+
key = "tke_cluster_instance_id"
14+
operator = "="
15+
value = ["cls-mw2w40s7"]
16+
}
17+
}
18+
1719
```
1820
*/
1921
package tencentcloud

tencentcloud/data_source_tc_sqlserver_backups.go

Lines changed: 66 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,85 @@
11
/*
22
Use this data source to query the list of SQL Server backups.
33
4-
Example Usage
4+
# Example Usage
55
66
```hcl
7-
data "tencentcloud_availability_zones_by_product" "zones" {
8-
product = "sqlserver"
9-
}
107
11-
data "tencentcloud_sqlserver_backups" "example" {
12-
instance_id = tencentcloud_sqlserver_general_backup.example.instance_id
13-
start_time = "2023-08-01 00:00:00"
14-
end_time = "2023-08-07 00:00:00"
15-
}
8+
data "tencentcloud_availability_zones_by_product" "zones" {
9+
product = "sqlserver"
10+
}
1611
17-
resource "tencentcloud_vpc" "vpc" {
18-
name = "vpc-example"
19-
cidr_block = "10.0.0.0/16"
20-
}
12+
data "tencentcloud_sqlserver_backups" "example" {
13+
instance_id = tencentcloud_sqlserver_general_backup.example.instance_id
14+
start_time = "2023-08-01 00:00:00"
15+
end_time = "2023-08-07 00:00:00"
16+
}
2117
22-
resource "tencentcloud_subnet" "subnet" {
23-
availability_zone = data.tencentcloud_availability_zones_by_product.zones.zones.4.name
24-
name = "subnet-example"
25-
vpc_id = tencentcloud_vpc.vpc.id
26-
cidr_block = "10.0.0.0/16"
27-
is_multicast = false
28-
}
18+
resource "tencentcloud_vpc" "vpc" {
19+
name = "vpc-example"
20+
cidr_block = "10.0.0.0/16"
21+
}
2922
30-
resource "tencentcloud_security_group" "security_group" {
31-
name = "sg-example"
32-
description = "desc."
33-
}
23+
resource "tencentcloud_subnet" "subnet" {
24+
availability_zone = data.tencentcloud_availability_zones_by_product.zones.zones.4.name
25+
name = "subnet-example"
26+
vpc_id = tencentcloud_vpc.vpc.id
27+
cidr_block = "10.0.0.0/16"
28+
is_multicast = false
29+
}
3430
35-
resource "tencentcloud_sqlserver_basic_instance" "example" {
36-
name = "tf-example"
37-
availability_zone = data.tencentcloud_availability_zones_by_product.zones.zones.4.name
38-
charge_type = "POSTPAID_BY_HOUR"
39-
vpc_id = tencentcloud_vpc.vpc.id
40-
subnet_id = tencentcloud_subnet.subnet.id
41-
project_id = 0
42-
memory = 4
43-
storage = 100
44-
cpu = 2
45-
machine_type = "CLOUD_PREMIUM"
46-
maintenance_week_set = [1, 2, 3]
47-
maintenance_start_time = "09:00"
48-
maintenance_time_span = 3
49-
security_groups = [tencentcloud_security_group.security_group.id]
50-
51-
tags = {
52-
"test" = "test"
53-
}
54-
}
31+
resource "tencentcloud_security_group" "security_group" {
32+
name = "sg-example"
33+
description = "desc."
34+
}
5535
56-
resource "tencentcloud_sqlserver_db" "example" {
57-
instance_id = tencentcloud_sqlserver_basic_instance.example.id
58-
name = "tf_example_db"
59-
charset = "Chinese_PRC_BIN"
60-
remark = "test-remark"
61-
}
36+
resource "tencentcloud_sqlserver_basic_instance" "example" {
37+
name = "tf-example"
38+
availability_zone = data.tencentcloud_availability_zones_by_product.zones.zones.4.name
39+
charge_type = "POSTPAID_BY_HOUR"
40+
vpc_id = tencentcloud_vpc.vpc.id
41+
subnet_id = tencentcloud_subnet.subnet.id
42+
project_id = 0
43+
memory = 4
44+
storage = 100
45+
cpu = 2
46+
machine_type = "CLOUD_PREMIUM"
47+
maintenance_week_set = [1, 2, 3]
48+
maintenance_start_time = "09:00"
49+
maintenance_time_span = 3
50+
security_groups = [tencentcloud_security_group.security_group.id]
51+
52+
tags = {
53+
"test" = "test"
54+
}
55+
}
56+
57+
resource "tencentcloud_sqlserver_db" "example" {
58+
instance_id = tencentcloud_sqlserver_basic_instance.example.id
59+
name = "tf_example_db"
60+
charset = "Chinese_PRC_BIN"
61+
remark = "test-remark"
62+
}
63+
64+
resource "tencentcloud_sqlserver_general_backup" "example" {
65+
instance_id = tencentcloud_sqlserver_db.example.instance_id
66+
backup_name = "tf_example_backup"
67+
strategy = 0
68+
}
6269
63-
resource "tencentcloud_sqlserver_general_backup" "example" {
64-
instance_id = tencentcloud_sqlserver_db.example.instance_id
65-
backup_name = "tf_example_backup"
66-
strategy = 0
67-
}
6870
```
6971
70-
Filter by backup name
72+
# Filter by backup name
7173
7274
```hcl
73-
data "tencentcloud_sqlserver_backups" "example" {
74-
instance_id = tencentcloud_sqlserver_general_backup.example.instance_id
75-
start_time = "2023-08-01 00:00:00"
76-
end_time = "2023-08-07 00:00:00"
77-
backup_name = "tf-example-backup"
78-
}
75+
76+
data "tencentcloud_sqlserver_backups" "example" {
77+
instance_id = tencentcloud_sqlserver_general_backup.example.instance_id
78+
start_time = "2023-08-01 00:00:00"
79+
end_time = "2023-08-07 00:00:00"
80+
backup_name = "tf-example-backup"
81+
}
82+
7983
```
8084
*/
8185
package tencentcloud

tencentcloud/data_source_tc_tdmq_rabbitmq_node_list.go

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
/*
22
Use this data source to query detailed information of tdmq rabbitmq_node_list
33
4-
Example Usage
4+
# Example Usage
55
66
```hcl
7-
data "tencentcloud_tdmq_rabbitmq_node_list" "rabbitmq_node_list" {
8-
instance_id = "amqp-testtesttest"
9-
node_name = "keep-node"
10-
filters {
11-
name = "nodeStatus"
12-
values = ["running", "down"]
13-
}
14-
sort_element = "cpuUsage"
15-
sort_order = "descend"
16-
}
7+
8+
data "tencentcloud_tdmq_rabbitmq_node_list" "rabbitmq_node_list" {
9+
instance_id = "amqp-testtesttest"
10+
node_name = "keep-node"
11+
filters {
12+
name = "nodeStatus"
13+
values = ["running", "down"]
14+
}
15+
sort_element = "cpuUsage"
16+
sort_order = "descend"
17+
}
18+
1719
```
1820
*/
1921
package tencentcloud

tencentcloud/data_source_tc_tdmq_rabbitmq_vip_instance.go

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
/*
22
Use this data source to query detailed information of tdmq rabbitmq_vip_instance
33
4-
Example Usage
4+
# Example Usage
55
66
```hcl
7-
data "tencentcloud_tdmq_rabbitmq_vip_instance" "rabbitmq_vip_instance" {
8-
filters {
9-
name = ""
10-
values = []
11-
}
12-
}
7+
8+
data "tencentcloud_tdmq_rabbitmq_vip_instance" "rabbitmq_vip_instance" {
9+
filters {
10+
name = ""
11+
values = []
12+
}
13+
}
14+
1315
```
1416
*/
1517
package tencentcloud

tencentcloud/data_source_tc_tdmq_vip_instance.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
/*
22
Use this data source to query detailed information of tdmq vip_instance
33
4-
Example Usage
4+
# Example Usage
55
66
```hcl
7-
data "tencentcloud_tdmq_vip_instance" "vip_instance" {
8-
cluster_id = "rocketmq-rd3545bkkj49"
9-
}
7+
8+
data "tencentcloud_tdmq_vip_instance" "vip_instance" {
9+
cluster_id = "rocketmq-rd3545bkkj49"
10+
}
11+
1012
```
1113
*/
1214
package tencentcloud

0 commit comments

Comments
 (0)