Skip to content

Commit fa69fbf

Browse files
committed
add doc
1 parent 568447d commit fa69fbf

File tree

1 file changed

+33
-1
lines changed

1 file changed

+33
-1
lines changed

website/docs/r/cos_bucket.html.markdown

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,37 @@ resource "tencentcloud_cos_bucket" "private_bucket" {
4646
}
4747
```
4848

49+
### Enable SSE-KMS encryption
50+
51+
```hcl
52+
data "tencentcloud_user_info" "info" {}
53+
54+
locals {
55+
app_id = data.tencentcloud_user_info.info.app_id
56+
}
57+
58+
resource "tencentcloud_kms_key" "example" {
59+
alias = "tf-example-kms-key"
60+
description = "example of kms key"
61+
key_rotation_enabled = false
62+
is_enabled = true
63+
64+
tags = {
65+
"createdBy" = "terraform"
66+
}
67+
}
68+
69+
resource "tencentcloud_cos_bucket" "bucket_basic" {
70+
bucket = "tf-bucket-cdc-${local.app_id}"
71+
acl = "private"
72+
encryption_algorithm = "KMS"
73+
kms_id = tencentcloud_kms_key.example.id
74+
versioning_enable = true
75+
acceleration_enable = true
76+
force_clean = true
77+
}
78+
```
79+
4980
### Creation of multiple available zone bucket
5081

5182
```hcl
@@ -305,10 +336,11 @@ The following arguments are supported:
305336
* `cdc_id` - (Optional, String, ForceNew) CDC cluster ID.
306337
* `cors_rules` - (Optional, List) A rule of Cross-Origin Resource Sharing (documented below).
307338
* `enable_intelligent_tiering` - (Optional, Bool) Enable intelligent tiering. NOTE: When intelligent tiering configuration is enabled, it cannot be turned off or modified.
308-
* `encryption_algorithm` - (Optional, String) The server-side encryption algorithm to use. Valid value is `AES256`.
339+
* `encryption_algorithm` - (Optional, String) The server-side encryption algorithm to use. Valid value is `AES256` or `KMS`.
309340
* `force_clean` - (Optional, Bool) Force cleanup all objects before delete bucket.
310341
* `intelligent_tiering_days` - (Optional, Int) Specifies the limit of days for standard-tier data to low-frequency data in an intelligent tiered storage configuration, with optional days of 30, 60, 90. Default value is 30.
311342
* `intelligent_tiering_request_frequent` - (Optional, Int) Specify the access limit for converting standard layer data into low-frequency layer data in the configuration. The default value is once, which can be used in combination with the number of days to achieve the conversion effect. For example, if the parameter is set to 1 and the number of access days is 30, it means that objects with less than one visit in 30 consecutive days will be reduced from the standard layer to the low frequency layer.
343+
* `kms_id` - (Optional, String) The KMS Master Key ID. When `encryption_algorithm` is set to `KMS`, please provide it.
312344
* `lifecycle_rules` - (Optional, List) A configuration of object lifecycle management (documented below).
313345
* `log_enable` - (Optional, Bool) Indicate the access log of this bucket to be saved or not. Default is `false`. If set `true`, the access log will be saved with `log_target_bucket`. To enable log, the full access of log service must be granted. [Full Access Role Policy](https://intl.cloud.tencent.com/document/product/436/16920).
314346
* `log_prefix` - (Optional, String) The prefix log name which saves the access log of this bucket per 5 minutes. Eg. `MyLogPrefix/`. The log access file format is `log_target_bucket`/`log_prefix`{YYYY}/{MM}/{DD}/{time}_{random}_{index}.gz. Only valid when `log_enable` is `true`.

0 commit comments

Comments
 (0)