Skip to content

Commit 49c561f

Browse files
authored
fix(dlc): [126452417] resource and datasource (#3470)
* add * add * add
1 parent 3f7dd50 commit 49c561f

File tree

56 files changed

+16786
-7550
lines changed

Some content is hidden

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

56 files changed

+16786
-7550
lines changed

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,15 @@ require (
4646
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/clb v1.0.1107
4747
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cloudaudit v1.0.1033
4848
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cls v1.0.1148
49-
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.1.4
49+
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.1.5
5050
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm v1.0.1153
5151
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cwp v1.0.762
5252
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cynosdb v1.0.1161
5353
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dayu v1.0.335
5454
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dbbrain v1.0.652
5555
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dc v1.0.633
5656
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dcdb v1.0.673
57-
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dlc v1.0.797
57+
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dlc v1.1.5
5858
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dnspod v1.0.1056
5959
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/domain v1.0.414
6060
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dts v1.0.628

go.sum

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -936,6 +936,8 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1203/go.mod
936936
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.1.0/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0=
937937
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.1.4 h1:OSHvdW1Q27QGhpD2iQr27LANTgQozBlKQ7usppaOmSQ=
938938
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.1.4/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0=
939+
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.1.5 h1:o96wtYe9H2a1aZI1pO4Cr9V5WOPd5JDf6O9YK7Ek64Q=
940+
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.1.5/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0=
939941
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/controlcenter v1.0.993 h1:WlPgXldQCxt7qi5Xrc6j6zTrsXWzN5BcOGs7Irq7fwQ=
940942
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/controlcenter v1.0.993/go.mod h1:Z9U8zNtyuyKhjS0698wqsrG/kLx1TQ5CEixXBwVe7xY=
941943
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/csip v1.0.860 h1:F3esKBIT3HW9+7Gt8cVgf8X06VdGIczpgLBUECzSEzU=
@@ -958,6 +960,8 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dcdb v1.0.673 h1:YyjGLj
958960
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dcdb v1.0.673/go.mod h1:hXPMop1kJFqAvHj+7TyxxxXS/HGUP4SuKx5gGoAl0Zc=
959961
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dlc v1.0.797 h1:6hfb2rnbkT2hth7rXFY6diu23kRVCdLQb0dOfMYYy60=
960962
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dlc v1.0.797/go.mod h1:7nIkeQ6XbNx8aLuX5MxZExH0WVmQDIsHbb7Mk/JunPg=
963+
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dlc v1.1.5 h1:0GJ2seyiCYrIfupZWb8CzMfTRw43K8PV41ISRaA81FU=
964+
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dlc v1.1.5/go.mod h1:vipcBjuWWiD8NgkeDdflpmTAHFf/zH+chcpW4ADnwi4=
961965
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dnspod v1.0.1056 h1:kvJuKukDqbt1nKzaVRdcbvs3w9CoMz3V1oQp6jo3rSw=
962966
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dnspod v1.0.1056/go.mod h1:TLTlcL7Dr1p0vPg0NvOi1CJEx2xG1zTlP+4k+ggxnZE=
963967
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/domain v1.0.414 h1:egwjvOEUKBaxsoRVn/YSEhp2E8qdh77Ous9A/wftDo0=

tencentcloud/services/dlc/data_source_tc_dlc_check_data_engine_image_can_be_rollback.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,25 @@ func DataSourceTencentCloudDlcCheckDataEngineImageCanBeRollback() *schema.Resour
1919
"data_engine_id": {
2020
Required: true,
2121
Type: schema.TypeString,
22-
Description: "Engine unique id.",
22+
Description: "Unique engine ID.",
2323
},
2424

2525
"to_record_id": {
2626
Computed: true,
2727
Type: schema.TypeString,
28-
Description: "Log record id after rollback.",
28+
Description: "Log record ID after rolling back.",
2929
},
3030

3131
"from_record_id": {
3232
Computed: true,
3333
Type: schema.TypeString,
34-
Description: "Log record id before rollback.",
34+
Description: "Log record ID before rolling back.",
3535
},
3636

3737
"is_rollback": {
3838
Computed: true,
3939
Type: schema.TypeBool,
40-
Description: "Is it possible to roll back.",
40+
Description: "Whether it can be rolled back.",
4141
},
4242

4343
"result_output_file": {
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
Use this data source to query detailed information of dlc check_data_engine_image_can_be_rollback
1+
Use this data source to query detailed information of DLC check data engine image can be rollback
22

33
Example Usage
44

55
```hcl
6-
data "tencentcloud_dlc_check_data_engine_image_can_be_rollback" "check_data_engine_image_can_be_rollback" {
7-
data_engine_id = "DataEngine-public-1308919341"
8-
}
9-
```
6+
data "tencentcloud_dlc_check_data_engine_image_can_be_rollback" "example" {
7+
data_engine_id = "DataEngine-80ibn1cj"
8+
}
9+
```

tencentcloud/services/dlc/data_source_tc_dlc_check_data_engine_image_can_be_upgrade.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,19 @@ func DataSourceTencentCloudDlcCheckDataEngineImageCanBeUpgrade() *schema.Resourc
1919
"data_engine_id": {
2020
Required: true,
2121
Type: schema.TypeString,
22-
Description: "Engine unique id.",
22+
Description: "Unique engine ID.",
2323
},
2424

2525
"child_image_version_id": {
2626
Computed: true,
2727
Type: schema.TypeString,
28-
Description: "The latest image version id that can be upgraded.",
28+
Description: "ID of the minor version of the cluster image that can be updated under the major version.",
2929
},
3030

3131
"is_upgrade": {
3232
Computed: true,
3333
Type: schema.TypeBool,
34-
Description: "Is it possible to upgrade.",
34+
Description: "Whether it can be updated.",
3535
},
3636

3737
"result_output_file": {
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
Use this data source to query detailed information of dlc check_data_engine_image_can_be_upgrade
1+
Use this data source to query detailed information of DLC check data engine image can be upgrade
22

33
Example Usage
44

55
```hcl
6-
data "tencentcloud_dlc_check_data_engine_image_can_be_upgrade" "check_data_engine_image_can_be_upgrade" {
7-
data_engine_id = "DataEngine-cgkvbas6"
8-
}
9-
```
6+
data "tencentcloud_dlc_check_data_engine_image_can_be_upgrade" "example" {
7+
data_engine_id = "DataEngine-80ibn1cj"
8+
}
9+
```

tencentcloud/services/dlc/data_source_tc_dlc_describe_data_engine.go

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -34,22 +34,22 @@ func DataSourceTencentCloudDlcDescribeDataEngine() *schema.Resource {
3434
"engine_type": {
3535
Type: schema.TypeString,
3636
Computed: true,
37-
Description: "Engine type, only support: spark/presto.",
37+
Description: "Engine type: spark/presto.",
3838
},
3939
"cluster_type": {
4040
Type: schema.TypeString,
4141
Computed: true,
42-
Description: "Engine cluster type, only support: spark_cu/presto_cu.",
42+
Description: "Cluster resource type spark_private/presto_private/presto_cu/spark_cu.",
4343
},
4444
"quota_id": {
4545
Type: schema.TypeString,
4646
Computed: true,
47-
Description: "Reference ID.",
47+
Description: "Quota ID.",
4848
},
4949
"state": {
5050
Type: schema.TypeInt,
5151
Computed: true,
52-
Description: "Engine state, only support: 0:Init/-1:Failed/-2:Deleted/1:Pause/2:Running/3:ToBeDelete/4:Deleting.",
52+
Description: "Data engine status -2 deleted, -1 failed, 0 initializing, 1 suspended, 2 running, 3 ready to delete, and 4 deleting.",
5353
},
5454
"create_time": {
5555
Type: schema.TypeInt,
@@ -64,52 +64,52 @@ func DataSourceTencentCloudDlcDescribeDataEngine() *schema.Resource {
6464
"size": {
6565
Type: schema.TypeInt,
6666
Computed: true,
67-
Description: "Engine size.",
67+
Description: "Cluster specifications.",
6868
},
6969
"mode": {
7070
Type: schema.TypeInt,
7171
Computed: true,
72-
Description: "Engine mode, only support 1: ByAmount, 2: YearlyAndMonthly.",
72+
Description: "Billing mode: 0 shared mode, 1 pay-as-you-go, and 2 monthly subscription.",
7373
},
7474
"min_clusters": {
7575
Type: schema.TypeInt,
7676
Computed: true,
77-
Description: "Engine min size, greater than or equal to 1 and MaxClusters bigger than MinClusters.",
77+
Description: "Minimum number of clusters.",
7878
},
7979
"max_clusters": {
8080
Type: schema.TypeInt,
8181
Computed: true,
82-
Description: "Engine max cluster size, MaxClusters less than or equal to 10 and MaxClusters bigger than MinClusters.",
82+
Description: "Maximum number of clusters.",
8383
},
8484
"auto_resume": {
8585
Type: schema.TypeBool,
8686
Computed: true,
87-
Description: "Whether to automatically start the cluster, prepay not support.",
87+
Description: "Whether to recover automatically.",
8888
},
8989
"spend_after": {
9090
Type: schema.TypeInt,
9191
Computed: true,
92-
Description: "Automatic recovery time, prepay not support.",
92+
Description: "Automatic recovery time.",
9393
},
9494
"cidr_block": {
9595
Type: schema.TypeString,
9696
Computed: true,
97-
Description: "Engine VPC network segment, just like 192.0.2.1/24.",
97+
Description: "Cluster IP range.",
9898
},
9999
"default_data_engine": {
100100
Type: schema.TypeBool,
101101
Computed: true,
102-
Description: "Whether it is the default virtual cluster.",
102+
Description: "Whether it is the default engine.",
103103
},
104104
"message": {
105105
Type: schema.TypeString,
106106
Computed: true,
107-
Description: "Engine description information.",
107+
Description: "Returned Message.",
108108
},
109109
"data_engine_id": {
110110
Type: schema.TypeString,
111111
Computed: true,
112-
Description: "Engine unique id.",
112+
Description: "Engine unique ID.",
113113
},
114114
"sub_account_uin": {
115115
Type: schema.TypeString,
@@ -119,22 +119,22 @@ func DataSourceTencentCloudDlcDescribeDataEngine() *schema.Resource {
119119
"expire_time": {
120120
Type: schema.TypeString,
121121
Computed: true,
122-
Description: "Expire time.",
122+
Description: "Expiration time.",
123123
},
124124
"isolated_time": {
125125
Type: schema.TypeString,
126126
Computed: true,
127-
Description: "Isolated time.",
127+
Description: "Isolation time.",
128128
},
129129
"reversal_time": {
130130
Type: schema.TypeString,
131131
Computed: true,
132-
Description: "Reversal time.",
132+
Description: "Rectification time.",
133133
},
134134
"user_alias": {
135135
Type: schema.TypeString,
136136
Computed: true,
137-
Description: "User's nickname.",
137+
Description: "Username.",
138138
},
139139
"tag_list": {
140140
Type: schema.TypeList,
@@ -312,6 +312,12 @@ func DataSourceTencentCloudDlcDescribeDataEngine() *schema.Resource {
312312
},
313313
},
314314
"ui_u_r_l": {
315+
Type: schema.TypeString,
316+
Computed: true,
317+
Deprecated: "It has been deprecated. Use `ui_url` instead.",
318+
Description: "Jump address of ui.",
319+
},
320+
"ui_url": {
315321
Type: schema.TypeString,
316322
Computed: true,
317323
Description: "Jump address of ui.",
@@ -683,6 +689,7 @@ func dataSourceTencentCloudDlcDescribeDataEngineRead(d *schema.ResourceData, met
683689

684690
if dataEngine.UiURL != nil {
685691
dataEngineInfoMap["ui_u_r_l"] = dataEngine.UiURL
692+
dataEngineInfoMap["ui_url"] = dataEngine.UiURL
686693
}
687694

688695
if dataEngine.ResourceType != nil {
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
Use this data source to query detailed information of dlc describe_data_engine
1+
Use this data source to query detailed information of DLC describe data engine
22

33
Example Usage
44

55
```hcl
6-
data "tencentcloud_dlc_describe_data_engine" "describe_data_engine" {
7-
data_engine_name = "testSpark"
8-
}
9-
```
6+
data "tencentcloud_dlc_describe_data_engine" "example" {
7+
data_engine_name = "tf-example"
8+
}
9+
```

tencentcloud/services/dlc/data_source_tc_dlc_describe_data_engine_events.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ func DataSourceTencentCloudDlcDescribeDataEngineEvents() *schema.Resource {
2222
Description: "Data engine name.",
2323
},
2424

25+
"session_id": {
26+
Optional: true,
27+
Type: schema.TypeString,
28+
Description: "Session ID, standard spark engine required.",
29+
},
30+
2531
"events": {
2632
Computed: true,
2733
Type: schema.TypeList,
@@ -78,6 +84,10 @@ func dataSourceTencentCloudDlcDescribeDataEngineEventsRead(d *schema.ResourceDat
7884
paramMap["DataEngineName"] = helper.String(v.(string))
7985
}
8086

87+
if v, ok := d.GetOk("session_id"); ok {
88+
paramMap["SessionId"] = helper.String(v.(string))
89+
}
90+
8191
service := DlcService{client: meta.(tccommon.ProviderMeta).GetAPIV3Conn()}
8292

8393
var events []*dlc.HouseEventsInfo
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
Use this data source to query detailed information of dlc describe_data_engine_events
1+
Use this data source to query detailed information of DLC describe data engine events
22

33
Example Usage
44

55
```hcl
6-
data "tencentcloud_dlc_describe_data_engine_events" "describe_data_engine_events" {
7-
data_engine_name = "test"
8-
}
6+
data "tencentcloud_dlc_describe_data_engine_events" "example" {
7+
data_engine_name = "tf-example"
8+
}
99
```

0 commit comments

Comments
 (0)