Skip to content

Commit 932660b

Browse files
committed
add
1 parent 2db1d17 commit 932660b

6 files changed

+56
-22
lines changed

tencentcloud/services/cbs/data_source_tc_cbs_storages.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func DataSourceTencentCloudCbsStorages() *schema.Resource {
5757
"charge_type": {
5858
Type: schema.TypeList,
5959
Optional: true,
60-
Description: "List filter by disk charge type (`POSTPAID_BY_HOUR` | `PREPAID`).",
60+
Description: "List filter by disk charge type (`POSTPAID_BY_HOUR` | `PREPAID` | `CDCPAID` | `DEDICATED_CLUSTER_PAID`).",
6161
Elem: &schema.Schema{Type: schema.TypeString},
6262
},
6363
"portable": {
@@ -221,7 +221,7 @@ func dataSourceTencentCloudCbsStoragesRead(d *schema.ResourceData, meta interfac
221221
}
222222

223223
if v, ok := d.GetOk("dedicated_cluster_id"); ok {
224-
params["dedicated-cluster-id "] = v.(string)
224+
params["dedicated-cluster-id"] = v.(string)
225225
}
226226

227227
if v, ok := d.GetOkExists("project_id"); ok {

tencentcloud/services/cbs/data_source_tc_cbs_storages.md

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,37 @@ Use this data source to query detailed information of CBS storages.
22

33
Example Usage
44

5+
Query all CBS storages
56
```hcl
6-
data "tencentcloud_cbs_storages" "storages" {
7-
storage_id = "disk-kdt0sq6m"
8-
result_output_file = "mytestpath"
7+
data "tencentcloud_cbs_storages" "example" {}
8+
```
9+
10+
Query CBS by storage id
11+
12+
```hcl
13+
data "tencentcloud_cbs_storages" "example" {
14+
storage_id = "disk-6goq404g"
15+
result_output_file = "my-test-path"
16+
}
17+
```
18+
19+
Query CBS by dedicated cluster id
20+
```hcl
21+
data "tencentcloud_cbs_storages" "example" {
22+
dedicated_cluster_id = "cluster-262n63e8"
923
}
1024
```
1125

1226
The following snippet shows the new supported query params
1327

1428
```hcl
1529
data "tencentcloud_cbs_storages" "whats_new" {
16-
charge_type = ["POSTPAID_BY_HOUR", "PREPAID"]
17-
portable = true
30+
charge_type = ["POSTPAID_BY_HOUR", "PREPAID", "CDCPAID", "DEDICATED_CLUSTER_PAID"]
1831
storage_state = ["ATTACHED"]
19-
instance_ips = ["10.0.0.2"]
32+
instance_ips = ["10.0.0.2"]
2033
instance_name = ["my-instance"]
21-
tag_keys = ["foo"]
22-
tag_values = ["bar", "baz"]
34+
tag_keys = ["example"]
35+
tag_values = ["bar", "baz"]
36+
portable = true
2337
}
2438
```

tencentcloud/services/cbs/data_source_tc_cbs_storages_set.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ func DataSourceTencentCloudCbsStoragesSet() *schema.Resource {
5656
"charge_type": {
5757
Type: schema.TypeList,
5858
Optional: true,
59-
Description: "List filter by disk charge type (`POSTPAID_BY_HOUR` | `PREPAID`).",
59+
Description: "List filter by disk charge type (`POSTPAID_BY_HOUR` | `PREPAID` | `CDCPAID` | `DEDICATED_CLUSTER_PAID`).",
6060
Elem: &schema.Schema{Type: schema.TypeString},
6161
},
6262
"portable": {
@@ -220,7 +220,7 @@ func dataSourceTencentCloudCbsStoragesSetRead(d *schema.ResourceData, meta inter
220220
}
221221

222222
if v, ok := d.GetOk("dedicated_cluster_id"); ok {
223-
params["dedicated-cluster-id "] = v.(string)
223+
params["dedicated-cluster-id"] = v.(string)
224224
}
225225

226226
if v, ok := d.GetOkExists("project_id"); ok {

tencentcloud/services/cbs/data_source_tc_cbs_storages_set.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@ Use this data source to query detailed information of CBS storages in parallel.
22

33
Example Usage
44

5+
Query CBS by storage set by zone
6+
57
```hcl
6-
data "tencentcloud_cbs_storages_set" "storages" {
8+
data "tencentcloud_cbs_storages_set" "example" {
79
availability_zone = "ap-guangzhou-3"
810
}
911
```

website/docs/d/cbs_storages.html.markdown

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,40 @@ Use this data source to query detailed information of CBS storages.
1313

1414
## Example Usage
1515

16+
### Query all CBS storages
17+
18+
```hcl
19+
data "tencentcloud_cbs_storages" "example" {}
20+
```
21+
22+
### Query CBS by storage id
23+
24+
```hcl
25+
data "tencentcloud_cbs_storages" "example" {
26+
storage_id = "disk-6goq404g"
27+
result_output_file = "my-test-path"
28+
}
29+
```
30+
31+
### Query CBS by dedicated cluster id
32+
1633
```hcl
17-
data "tencentcloud_cbs_storages" "storages" {
18-
storage_id = "disk-kdt0sq6m"
19-
result_output_file = "mytestpath"
34+
data "tencentcloud_cbs_storages" "example" {
35+
dedicated_cluster_id = "cluster-262n63e8"
2036
}
2137
```
2238

2339
### The following snippet shows the new supported query params
2440

2541
```hcl
2642
data "tencentcloud_cbs_storages" "whats_new" {
27-
charge_type = ["POSTPAID_BY_HOUR", "PREPAID"]
28-
portable = true
43+
charge_type = ["POSTPAID_BY_HOUR", "PREPAID", "CDCPAID", "DEDICATED_CLUSTER_PAID"]
2944
storage_state = ["ATTACHED"]
3045
instance_ips = ["10.0.0.2"]
3146
instance_name = ["my-instance"]
32-
tag_keys = ["foo"]
47+
tag_keys = ["example"]
3348
tag_values = ["bar", "baz"]
49+
portable = true
3450
}
3551
```
3652

@@ -39,7 +55,7 @@ data "tencentcloud_cbs_storages" "whats_new" {
3955
The following arguments are supported:
4056

4157
* `availability_zone` - (Optional, String) The available zone that the CBS instance locates at.
42-
* `charge_type` - (Optional, List: [`String`]) List filter by disk charge type (`POSTPAID_BY_HOUR` | `PREPAID`).
58+
* `charge_type` - (Optional, List: [`String`]) List filter by disk charge type (`POSTPAID_BY_HOUR` | `PREPAID` | `CDCPAID` | `DEDICATED_CLUSTER_PAID`).
4359
* `dedicated_cluster_id` - (Optional, String) Exclusive cluster id.
4460
* `instance_ips` - (Optional, List: [`String`]) List filter by attached instance public or private IPs.
4561
* `instance_name` - (Optional, List: [`String`]) List filter by attached instance name.

website/docs/d/cbs_storages_set.html.markdown

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@ Use this data source to query detailed information of CBS storages in parallel.
1313

1414
## Example Usage
1515

16+
### Query CBS by storage set by zone
17+
1618
```hcl
17-
data "tencentcloud_cbs_storages_set" "storages" {
19+
data "tencentcloud_cbs_storages_set" "example" {
1820
availability_zone = "ap-guangzhou-3"
1921
}
2022
```
@@ -24,7 +26,7 @@ data "tencentcloud_cbs_storages_set" "storages" {
2426
The following arguments are supported:
2527

2628
* `availability_zone` - (Optional, String) The available zone that the CBS instance locates at.
27-
* `charge_type` - (Optional, List: [`String`]) List filter by disk charge type (`POSTPAID_BY_HOUR` | `PREPAID`).
29+
* `charge_type` - (Optional, List: [`String`]) List filter by disk charge type (`POSTPAID_BY_HOUR` | `PREPAID` | `CDCPAID` | `DEDICATED_CLUSTER_PAID`).
2830
* `dedicated_cluster_id` - (Optional, String) Exclusive cluster id.
2931
* `instance_ips` - (Optional, List: [`String`]) List filter by attached instance public or private IPs.
3032
* `instance_name` - (Optional, List: [`String`]) List filter by attached instance name.

0 commit comments

Comments
 (0)