Skip to content

Commit 998794c

Browse files
author
“guojunchu”
committed
change tcr open_public_network
1 parent d355e87 commit 998794c

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

tencentcloud/resource_tc_tcr_instance.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func resourceTencentCloudTcrInstance() *schema.Resource {
6262
ForceNew: true,
6363
Description: "The available tags within this TCR instance.",
6464
},
65-
"public_operation": {
65+
"open_public_operation": {
6666
Type: schema.TypeBool,
6767
Optional: true,
6868
ForceNew: true,
@@ -151,7 +151,7 @@ func resourceTencentCloudTcrInstanceCreate(d *schema.ResourceData, meta interfac
151151
}
152152
if instanceStatus == "Running" {
153153
outErr = resource.Retry(writeRetryTimeout, func() *resource.RetryError {
154-
if v, ok := d.GetOk("public_operation"); ok {
154+
if v, ok := d.GetOk("open_public_operation"); ok {
155155
operation = v.(bool)
156156
if operation {
157157
inErr = tcrService.ManageTCRExternalEndpoint(ctx, instanceId, "Create")
@@ -216,9 +216,9 @@ func resourceTencentCloudTcrInstanceRead(d *schema.ResourceData, meta interface{
216216
return nil
217217
}
218218
if publicStatus == "Opening" || publicStatus == "Opened" {
219-
_ = d.Set("public_operation", true)
219+
_ = d.Set("open_public_operation", true)
220220
} else if publicStatus == "Closed" {
221-
_ = d.Set("public_operation", false)
221+
_ = d.Set("open_public_operation", false)
222222
}
223223

224224
_ = d.Set("name", instance.RegistryName)

tencentcloud/resource_tc_tcr_instance_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ resource "tencentcloud_tcr_instance" "mytcr_instance" {
9696
name = "testacctcrinstance1"
9797
instance_type = "basic"
9898
delete_bucket = true
99-
public_operation = false
99+
open_public_operation = false
100100
101101
tags ={
102102
test = "test"
@@ -108,7 +108,7 @@ resource "tencentcloud_tcr_instance" "mytcr_instance" {
108108
name = "testacctcrinstance2"
109109
instance_type = "basic"
110110
delete_bucket = true
111-
public_operation = true
111+
open_public_operation = true
112112
tags ={
113113
tf = "tf"
114114
}

website/docs/r/tcr_instance.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ The following arguments are supported:
3131
* `instance_type` - (Required, ForceNew) TCR types. Valid values are: `standard`, `basic`, `premium`.
3232
* `name` - (Required, ForceNew) Name of the TCR instance.
3333
* `delete_bucket` - (Optional) Indicate to delete the COS bucket which is auto-created with the instance or not.
34-
* `public_operation` - (Optional, ForceNew) Control public network access.
34+
* `open_public_operation` - (Optional, ForceNew) Control public network access.
3535
* `tags` - (Optional, ForceNew) The available tags within this TCR instance.
3636

3737
## Attributes Reference

0 commit comments

Comments
 (0)