Skip to content

Commit 3dddffc

Browse files
committed
feat: support data backfill
1 parent 8565c51 commit 3dddffc

15 files changed

+858
-0
lines changed

.changelog/3553.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,14 @@ tencentcloud_wedata_ops_alarm_messages
2222
tencentcloud_wedata_ops_upstream_tasks
2323
```
2424

25+
```release-note:new-data-source
26+
tencentcloud_wedata_data_backfill_instances
27+
```
28+
29+
```release-note:new-data-source
30+
tencentcloud_wedata_data_backfill_plan
31+
```
32+
2533
```release-note:new-resource
2634
tencentcloud_wedata_ops_task
2735
```

tencentcloud/provider.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1168,6 +1168,8 @@ func Provider() *schema.Provider {
11681168
"tencentcloud_wedata_task_code": wedata.DataSourceTencentCloudWedataTaskCode(),
11691169
"tencentcloud_wedata_task_version": wedata.DataSourceTencentCloudWedataTaskVersion(),
11701170
"tencentcloud_wedata_rule_templates": wedata.DataSourceTencentCloudWedataRuleTemplates(),
1171+
"tencentcloud_wedata_data_backfill_plan": wedata.DataSourceTencentCloudWedataDataBackfillPlan(),
1172+
"tencentcloud_wedata_data_backfill_instances": wedata.DataSourceTencentCloudWedataDataBackfillInstances(),
11711173
"tencentcloud_wedata_ops_workflows": wedata.DataSourceTencentCloudWedataOpsWorkflows(),
11721174
"tencentcloud_wedata_ops_workflow": wedata.DataSourceTencentCloudWedataOpsWorkflow(),
11731175
"tencentcloud_wedata_ops_async_job": wedata.DataSourceTencentCloudWedataOpsAsyncJob(),

tencentcloud/provider.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2230,6 +2230,8 @@ tencentcloud_wedata_downstream_tasks
22302230
tencentcloud_wedata_task_code
22312231
tencentcloud_wedata_task_version
22322232
tencentcloud_wedata_rule_templates
2233+
tencentcloud_wedata_data_backfill_plan
2234+
tencentcloud_wedata_data_backfill_instances
22332235
tencentcloud_wedata_ops_workflows
22342236
tencentcloud_wedata_ops_workflow
22352237
tencentcloud_wedata_ops_alarm_rules

tencentcloud/services/wedata/data_source_tc_wedata_data_backfill_instances.go

Lines changed: 228 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Use this data source to query detailed information of wedata data backfill instances
2+
3+
Example Usage
4+
5+
```hcl
6+
data "tencentcloud_wedata_data_backfill_instances" "wedata_data_backfill_instances" {
7+
project_id = "1859317240494305280"
8+
data_backfill_plan_id = "deb71ea1-f708-47ab-8eb6-491ce5b9c011"
9+
task_id = "20231011152006462"
10+
}
11+
```
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package wedata
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
package wedata_test
2+
3+
import (
4+
"testing"
5+
6+
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
7+
tcacctest "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/acctest"
8+
)
9+
10+
func TestAccTencentCloudWedataDataBackfillInstancesDataSource_basic(t *testing.T) {
11+
t.Parallel()
12+
resource.Test(t, resource.TestCase{
13+
PreCheck: func() {
14+
tcacctest.AccPreCheck(t)
15+
},
16+
Providers: tcacctest.AccProviders,
17+
Steps: []resource.TestStep{
18+
{
19+
Config: testAccWedataDataBackfillInstancesDataSource,
20+
Check: resource.ComposeTestCheckFunc(
21+
tcacctest.AccCheckTencentCloudDataSourceID("data.tencentcloud_wedata_data_backfill_instances.wedata_data_backfill_instances"),
22+
resource.TestCheckResourceAttrSet("data.tencentcloud_wedata_data_backfill_instances.wedata_data_backfill_instances", "id"),
23+
resource.TestCheckResourceAttr("data.tencentcloud_wedata_data_backfill_instances.wedata_data_backfill_instances", "data.#", "1"),
24+
),
25+
},
26+
},
27+
})
28+
}
29+
30+
const testAccWedataDataBackfillInstancesDataSource = `
31+
32+
data "tencentcloud_wedata_data_backfill_instances" "wedata_data_backfill_instances" {
33+
project_id = "1859317240494305280"
34+
data_backfill_plan_id = "deb71ea1-f708-47ab-8eb6-491ce5b9c011"
35+
task_id = "20231011152006462"
36+
}
37+
`

0 commit comments

Comments
 (0)