Skip to content

Commit 85fb6ef

Browse files
authored
Merge pull request #556 from cyberHermanwang/master
add cos bucket policy and modify tcr doc name
2 parents ea0afe5 + c2f769d commit 85fb6ef

11 files changed

+98
-27
lines changed

tencentcloud/provider.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ COS
216216
Resource
217217
tencentcloud_cos_bucket
218218
tencentcloud_cos_bucket_object
219+
tencentcloud_cos_bucket_policy
219220
220221
CVM
221222
Data Source
@@ -414,7 +415,7 @@ TcaplusDB
414415
tencentcloud_tcaplus_idl
415416
tencentcloud_tcaplus_table
416417
417-
TCR
418+
Tencent Container Registry(TCR)
418419
Data Source
419420
tencentcloud_tcr_instances
420421
tencentcloud_tcr_namespaces

website/docs/d/tcr_instances.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
subcategory: "TCR"
2+
subcategory: "Tencent Container Registry(TCR)"
33
layout: "tencentcloud"
44
page_title: "TencentCloud: tencentcloud_tcr_instances"
55
sidebar_current: "docs-tencentcloud-datasource-tcr_instances"

website/docs/d/tcr_namespaces.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
subcategory: "TCR"
2+
subcategory: "Tencent Container Registry(TCR)"
33
layout: "tencentcloud"
44
page_title: "TencentCloud: tencentcloud_tcr_namespaces"
55
sidebar_current: "docs-tencentcloud-datasource-tcr_namespaces"

website/docs/d/tcr_repositories.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
subcategory: "TCR"
2+
subcategory: "Tencent Container Registry(TCR)"
33
layout: "tencentcloud"
44
page_title: "TencentCloud: tencentcloud_tcr_repositories"
55
sidebar_current: "docs-tencentcloud-datasource-tcr_repositories"

website/docs/d/tcr_tokens.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
subcategory: "TCR"
2+
subcategory: "Tencent Container Registry(TCR)"
33
layout: "tencentcloud"
44
page_title: "TencentCloud: tencentcloud_tcr_tokens"
55
sidebar_current: "docs-tencentcloud-datasource-tcr_tokens"
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
subcategory: "COS"
3+
layout: "tencentcloud"
4+
page_title: "TencentCloud: tencentcloud_cos_bucket_policy"
5+
sidebar_current: "docs-tencentcloud-resource-cos_bucket_policy"
6+
description: |-
7+
Provides a COS resource to create a COS bucket policy and set its attributes.
8+
---
9+
10+
# tencentcloud_cos_bucket_policy
11+
12+
Provides a COS resource to create a COS bucket policy and set its attributes.
13+
14+
## Example Usage
15+
16+
```hcl
17+
resource "tencentcloud_cos_bucket_policy" "cos_policy" {
18+
bucket = "mycos-1258798060"
19+
20+
policy = <<EOF
21+
{
22+
"version": "2.0",
23+
"Statement": [
24+
{
25+
"Principal": {
26+
"qcs": [
27+
"qcs::cam::uin/<your-account-id>:uin/<your-account-id>"
28+
]
29+
},
30+
"Action": [
31+
"name/cos:DeleteBucket",
32+
"name/cos:PutBucketACL"
33+
],
34+
"Effect": "allow",
35+
"Resource": [
36+
"qcs::cos:<bucket region>:uid/<your-account-id>:<bucket name>/*"
37+
]
38+
}
39+
]
40+
}
41+
EOF
42+
}
43+
```
44+
45+
## Argument Reference
46+
47+
The following arguments are supported:
48+
49+
* `bucket` - (Required, ForceNew) The name of a bucket to be created. Bucket format should be [custom name]-[appid], for example `mycos-1258798060`.
50+
* `policy` - (Required) The text of the policy. For more info please refer to [Tencent official doc](https://intl.cloud.tencent.com/document/product/436/18023).
51+
52+
## Attributes Reference
53+
54+
In addition to all arguments above, the following attributes are exported:
55+
56+
* `id` - ID of the resource.
57+
58+
59+
60+
## Import
61+
62+
COS bucket policy can be imported, e.g.
63+
64+
```
65+
$ terraform import tencentcloud_cos_bucket_policy.bucket bucket-name
66+
```
67+

website/docs/r/tcr_instance.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
subcategory: "TCR"
2+
subcategory: "Tencent Container Registry(TCR)"
33
layout: "tencentcloud"
44
page_title: "TencentCloud: tencentcloud_tcr_instance"
55
sidebar_current: "docs-tencentcloud-resource-tcr_instance"

website/docs/r/tcr_namespace.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
subcategory: "TCR"
2+
subcategory: "Tencent Container Registry(TCR)"
33
layout: "tencentcloud"
44
page_title: "TencentCloud: tencentcloud_tcr_namespace"
55
sidebar_current: "docs-tencentcloud-resource-tcr_namespace"

website/docs/r/tcr_repository.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
subcategory: "TCR"
2+
subcategory: "Tencent Container Registry(TCR)"
33
layout: "tencentcloud"
44
page_title: "TencentCloud: tencentcloud_tcr_repository"
55
sidebar_current: "docs-tencentcloud-resource-tcr_repository"

website/docs/r/tcr_token.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
subcategory: "TCR"
2+
subcategory: "Tencent Container Registry(TCR)"
33
layout: "tencentcloud"
44
page_title: "TencentCloud: tencentcloud_tcr_token"
55
sidebar_current: "docs-tencentcloud-resource-tcr_token"

0 commit comments

Comments
 (0)