huaweicloud / terraform-provider-huaweicloud

Terraform HuaweiCloud provider
https://www.terraform.io/docs/providers/huaweicloud/
Mozilla Public License 2.0
213 stars 160 forks source link

feat(dws): add new datasource to query resource statistics #5555

Closed wuzhuanhong closed 1 month ago

wuzhuanhong commented 1 month ago

What this PR does / why we need it:

Add new data source to query the resource statistics of the DWS. Add related document and acceptace test.

Which issue this PR fixes: (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged) fixes #xxx

Special notes for your reviewer:

Release note:

PR Checklist


make testacc TEST=./huaweicloud/services/acceptance/dws TESTARGS='-run TestAccDataSourcStatistics_basic'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./huaweicloud/services/acceptance/dws -v -run TestAccDataSourcStatistics_basic -timeout 360m -parallel 4
=== RUN   TestAccDataSourcStatistics_basic
=== PAUSE TestAccDataSourcStatistics_basic
=== CONT  TestAccDataSourcStatistics_basic
--- PASS: TestAccDataSourcStatistics_basic (18.80s)
PASS
ok      github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud/services/acceptance/dws       18.883s```

* [x] Documentation updated.
* [x] Schema updated.
* [ ] CheckDeleted.

  - **a. During query operation (Read Context)**
    aa. Resource not found
    \>>>>>> Paste the screenshot here <<<<<<

    <!-- If the resource depends the parent resource(s), please provide the related check result(s) of the CheckDeleted validation.
    ab. Related resources (parent resources) not found
    \>>>>>> Paste the screenshot here <<<<<<
    -->
  - **b. During delete/disassociate/unbind operation (Delete Context)**
    ba. Resource not found
    \>>>>>> Paste the screenshot here <<<<<<

    <!-- If the resource depends the parent resource(s), please provide the related check result(s) of the CheckDeleted validation.
    bb. Related resources (parent resources) not found
    \>>>>>> Paste the screenshot here <<<<<<
    -->
Lance52259 commented 1 month ago

/approve /lgtm