Skip to content

Commit 3a21ff4

Browse files
committed
udpate docs
1 parent 0cb7bf3 commit 3a21ff4

File tree

2 files changed

+34
-2
lines changed

2 files changed

+34
-2
lines changed

tencentcloud/resource_tc_tcr_instance.go

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,21 @@ resource "tencentcloud_tcr_instance" "foo" {
1414
}
1515
```
1616
17+
Using public network access whitelist
18+
```
19+
resource "tencentcloud_tcr_instance" "foo" {
20+
name = "example"
21+
instance_type = "basic"
22+
open_public_operation = true
23+
security_poicy {
24+
cidr_block = "10.0.0.1/24"
25+
}
26+
security_policy {
27+
cidr_block = "192.168.1.1"
28+
}
29+
}
30+
```
31+
1732
Import
1833
1934
tcr instance can be imported using the id, e.g.
@@ -71,7 +86,7 @@ func resourceTencentCloudTcrInstance() *schema.Resource {
7186
"security_policy": {
7287
Type: schema.TypeSet,
7388
Optional: true,
74-
Description: "Public network access allowlist policies of the TCR instance.",
89+
Description: "Public network access allowlist policies of the TCR instance. Only available when `open_public_operation` is `true`.",
7590
Elem: &schema.Resource{
7691
Schema: map[string]*schema.Schema{
7792
"cidr_block": {

website/docs/r/tcr_instance.html.markdown

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
---
23
subcategory: "Tencent Container Registry(TCR)"
34
layout: "tencentcloud"
@@ -24,6 +25,22 @@ resource "tencentcloud_tcr_instance" "foo" {
2425
}
2526
```
2627

28+
Using public network access whitelist
29+
30+
```hcl
31+
resource "tencentcloud_tcr_instance" "foo" {
32+
name = "example"
33+
instance_type = "basic"
34+
open_public_operation = true
35+
security_poicy {
36+
cidr_block = "10.0.0.1/24"
37+
}
38+
security_policy {
39+
cidr_block = "192.168.1.1"
40+
}
41+
}
42+
```
43+
2744
## Argument Reference
2845

2946
The following arguments are supported:
@@ -32,7 +49,7 @@ The following arguments are supported:
3249
* `name` - (Required, ForceNew) Name of the TCR instance.
3350
* `delete_bucket` - (Optional) Indicate to delete the COS bucket which is auto-created with the instance or not.
3451
* `open_public_operation` - (Optional) Control public network access.
35-
* `security_policy` - (Optional) Public network access allowlist policies of the TCR instance.
52+
* `security_policy` - (Optional) Public network access allowlist policies of the TCR instance. Only available when `open_public_operation` is `true`.
3653
* `tags` - (Optional) The available tags within this TCR instance.
3754

3855
The `security_policy` object supports the following:

0 commit comments

Comments
 (0)