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" {
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+
1732Import
1833
1934tcr 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" : {
Original file line number Diff line number Diff line change 1+
12---
23subcategory: "Tencent Container Registry(TCR)"
34layout: "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
2946The 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
3855The ` security_policy ` object supports the following:
You can’t perform that action at this time.
0 commit comments