Skip to content

Commit 694011c

Browse files
authored
Merge pull request #717 from tencentcloudstack/fix/tcr-repo-meta-info
fix: tcr - repo docs mistake
2 parents b92ca04 + 1ff8186 commit 694011c

File tree

4 files changed

+18
-10
lines changed

4 files changed

+18
-10
lines changed

tencentcloud/resource_tc_tcr_instance.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ resource "tencentcloud_tcr_instance" "foo" {
2020
name = "example"
2121
instance_type = "basic"
2222
open_public_operation = true
23-
security_poicy {
23+
security_policy {
2424
cidr_block = "10.0.0.1/24"
2525
}
2626
security_policy {

tencentcloud/resource_tc_tcr_repository.go

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@ Use this resource to create tcr repository.
44
Example Usage
55
66
```hcl
7+
data "tencentcloud_tcr_instances" "test" {
8+
name = "test"
9+
}
10+
711
resource "tencentcloud_tcr_repository" "foo" {
8-
instance_id = ""
12+
instance_id = data.tencentcloud_tcr_instances.test.instance_list[0].id
913
namespace_name = "exampleNamespace"
1014
name = "example"
11-
is_public = true
1215
}
1316
```
1417
@@ -62,12 +65,14 @@ func resourceTencentCloudTcrRepository() *schema.Resource {
6265
},
6366
"brief_desc": {
6467
Type: schema.TypeString,
65-
Required: true,
68+
Optional: true,
69+
ValidateFunc: validateStringLengthInRange(1, 100),
6670
Description: "Brief description of the repository. Valid length is [1~100].",
6771
},
6872
"description": {
6973
Type: schema.TypeString,
70-
Required: true,
74+
Optional: true,
75+
ValidateFunc: validateStringLengthInRange(1, 1000),
7176
Description: "Description of the repository. Valid length is [1~1000].",
7277
},
7378
//computed

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 @@ resource "tencentcloud_tcr_instance" "foo" {
3131
name = "example"
3232
instance_type = "basic"
3333
open_public_operation = true
34-
security_poicy {
34+
security_policy {
3535
cidr_block = "10.0.0.1/24"
3636
}
3737
security_policy {

website/docs/r/tcr_repository.html.markdown

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,26 @@ Use this resource to create tcr repository.
1414
## Example Usage
1515

1616
```hcl
17+
data "tencentcloud_tcr_instances" "test" {
18+
name = "test"
19+
}
20+
1721
resource "tencentcloud_tcr_repository" "foo" {
18-
instance_id = ""
22+
instance_id = data.tencentcloud_tcr_instances.test.instance_list[0].id
1923
namespace_name = "exampleNamespace"
2024
name = "example"
21-
is_public = true
2225
}
2326
```
2427

2528
## Argument Reference
2629

2730
The following arguments are supported:
2831

29-
* `brief_desc` - (Required) Brief description of the repository. Valid length is [1~100].
30-
* `description` - (Required) Description of the repository. Valid length is [1~1000].
3132
* `instance_id` - (Required, ForceNew) ID of the TCR instance.
3233
* `name` - (Required, ForceNew) Name of the TCR repository. Valid length is [2~200]. It can only contain lowercase letters, numbers and separators (`.`, `_`, `-`, `/`), and cannot start, end or continue with separators. Support the use of multi-level address formats, such as `sub1/sub2/repo`.
3334
* `namespace_name` - (Required, ForceNew) Name of the TCR namespace.
35+
* `brief_desc` - (Optional) Brief description of the repository. Valid length is [1~100].
36+
* `description` - (Optional) Description of the repository. Valid length is [1~1000].
3437

3538
## Attributes Reference
3639

0 commit comments

Comments
 (0)