diff --git a/.changelog/3264.txt b/.changelog/3264.txt new file mode 100644 index 0000000000..e74e8ec25a --- /dev/null +++ b/.changelog/3264.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +resource/tencentcloud_cos_buckets: update doc +``` \ No newline at end of file diff --git a/tencentcloud/services/cos/data_source_tc_cos_buckets.md b/tencentcloud/services/cos/data_source_tc_cos_buckets.md index cfbdbde21b..0442303f04 100644 --- a/tencentcloud/services/cos/data_source_tc_cos_buckets.md +++ b/tencentcloud/services/cos/data_source_tc_cos_buckets.md @@ -2,9 +2,19 @@ Use this data source to query the COS buckets of the current Tencent Cloud user. Example Usage +Query all cos buckets + +```hcl +data "tencentcloud_cos_buckets" "example" {} +``` + +Query cos buckets by filters + ```hcl -data "tencentcloud_cos_buckets" "cos_buckets" { - bucket_prefix = "tf-bucket-" - result_output_file = "mytestpath" +data "tencentcloud_cos_buckets" "example" { + bucket_prefix = "tf-example-prefix" + tags = { + createBy = "Terraform" + } } -``` \ No newline at end of file +``` diff --git a/website/docs/d/cos_buckets.html.markdown b/website/docs/d/cos_buckets.html.markdown index 6247dc91b1..db16611dc4 100644 --- a/website/docs/d/cos_buckets.html.markdown +++ b/website/docs/d/cos_buckets.html.markdown @@ -13,10 +13,20 @@ Use this data source to query the COS buckets of the current Tencent Cloud user. ## Example Usage +### Query all cos buckets + +```hcl +data "tencentcloud_cos_buckets" "example" {} +``` + +### Query cos buckets by filters + ```hcl -data "tencentcloud_cos_buckets" "cos_buckets" { - bucket_prefix = "tf-bucket-" - result_output_file = "mytestpath" +data "tencentcloud_cos_buckets" "example" { + bucket_prefix = "tf-example-prefix" + tags = { + createBy = "Terraform" + } } ```