File tree Expand file tree Collapse file tree 2 files changed +34
-2
lines changed Expand file tree Collapse file tree 2 files changed +34
-2
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,21 @@ resource "tencentcloud_tcr_instance" "foo" {
14
14
}
15
15
```
16
16
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
+
17
32
Import
18
33
19
34
tcr instance can be imported using the id, e.g.
@@ -71,7 +86,7 @@ func resourceTencentCloudTcrInstance() *schema.Resource {
71
86
"security_policy" : {
72
87
Type : schema .TypeSet ,
73
88
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`. " ,
75
90
Elem : & schema.Resource {
76
91
Schema : map [string ]* schema.Schema {
77
92
"cidr_block" : {
Original file line number Diff line number Diff line change
1
+
1
2
---
2
3
subcategory: "Tencent Container Registry(TCR)"
3
4
layout: "tencentcloud"
@@ -24,6 +25,22 @@ resource "tencentcloud_tcr_instance" "foo" {
24
25
}
25
26
```
26
27
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
+
27
44
## Argument Reference
28
45
29
46
The following arguments are supported:
@@ -32,7 +49,7 @@ The following arguments are supported:
32
49
* ` name ` - (Required, ForceNew) Name of the TCR instance.
33
50
* ` delete_bucket ` - (Optional) Indicate to delete the COS bucket which is auto-created with the instance or not.
34
51
* ` 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 ` .
36
53
* ` tags ` - (Optional) The available tags within this TCR instance.
37
54
38
55
The ` security_policy ` object supports the following:
You can’t perform that action at this time.
0 commit comments