Skip to content

Commit 0b7d2ca

Browse files
authored
fix(dc): [123456789] tencentcloud_dc_instance update field properties (#3130)
* add * add
1 parent 5af0300 commit 0b7d2ca

File tree

4 files changed

+48
-15
lines changed

4 files changed

+48
-15
lines changed

.changelog/3130.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:enhancement
2+
resource/tencentcloud_dc_instance: update field properties and doc
3+
```

tencentcloud/services/dc/resource_tc_dc_instance.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ func ResourceTencentCloudDcInstance() *schema.Resource {
6262

6363
"bandwidth": {
6464
Optional: true,
65+
Computed: true,
6566
Type: schema.TypeInt,
6667
Description: "Connection port bandwidth in Mbps. Value range: [2,10240]. Default value: 1000.",
6768
},
@@ -74,6 +75,7 @@ func ResourceTencentCloudDcInstance() *schema.Resource {
7475

7576
"vlan": {
7677
Optional: true,
78+
Computed: true,
7779
Type: schema.TypeInt,
7880
Description: "VLAN for connection debugging, which is enabled and automatically assigned by default.",
7981
},
@@ -104,6 +106,7 @@ func ResourceTencentCloudDcInstance() *schema.Resource {
104106

105107
"customer_contact_number": {
106108
Optional: true,
109+
Computed: true,
107110
Type: schema.TypeString,
108111
Description: "Contact number of connection applicant, which is obtained from the account system by default.",
109112
},
@@ -122,6 +125,7 @@ func ResourceTencentCloudDcInstance() *schema.Resource {
122125

123126
"sign_law": {
124127
Optional: true,
128+
Computed: true,
125129
Type: schema.TypeBool,
126130
Description: "Whether the connection applicant has signed the service agreement. Default value: true.",
127131
},
Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,37 @@
1-
Provides a resource to create a dc instance
1+
Provides a resource to create a DC instance
22

33
Example Usage
44

5+
Create direct connect instance
6+
7+
```hcl
8+
resource "tencentcloud_dc_instance" "example" {
9+
direct_connect_name = "tf-example"
10+
access_point_id = "ap-shenzhen-b-ft"
11+
line_operator = "In-houseWiring"
12+
port_type = "10GBase-LR"
13+
}
14+
```
15+
16+
Or
17+
518
```hcl
619
resource "tencentcloud_dc_instance" "instance" {
20+
direct_connect_name = "tf-example"
721
access_point_id = "ap-shenzhen-b-ft"
8-
bandwidth = 10
9-
customer_contact_number = "0"
10-
direct_connect_name = "terraform-for-test"
1122
line_operator = "In-houseWiring"
1223
port_type = "10GBase-LR"
24+
bandwidth = 100
25+
vlan = 1
26+
customer_contact_number = "0"
1327
sign_law = true
14-
vlan = -1
1528
}
1629
```
1730

1831
Import
1932

20-
dc instance can be imported using the id, e.g.
33+
DC instance can be imported using the id, e.g.
2134

2235
```
23-
terraform import tencentcloud_dc_instance.instance dc_id
36+
terraform import tencentcloud_dc_instance.example dc-ovxsm3u5
2437
```

website/docs/r/dc_instance.html.markdown

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,38 @@ layout: "tencentcloud"
44
page_title: "TencentCloud: tencentcloud_dc_instance"
55
sidebar_current: "docs-tencentcloud-resource-dc_instance"
66
description: |-
7-
Provides a resource to create a dc instance
7+
Provides a resource to create a DC instance
88
---
99

1010
# tencentcloud_dc_instance
1111

12-
Provides a resource to create a dc instance
12+
Provides a resource to create a DC instance
1313

1414
## Example Usage
1515

16+
### Create direct connect instance
17+
18+
```hcl
19+
resource "tencentcloud_dc_instance" "example" {
20+
direct_connect_name = "tf-example"
21+
access_point_id = "ap-shenzhen-b-ft"
22+
line_operator = "In-houseWiring"
23+
port_type = "10GBase-LR"
24+
}
25+
```
26+
27+
### Or
28+
1629
```hcl
1730
resource "tencentcloud_dc_instance" "instance" {
31+
direct_connect_name = "tf-example"
1832
access_point_id = "ap-shenzhen-b-ft"
19-
bandwidth = 10
20-
customer_contact_number = "0"
21-
direct_connect_name = "terraform-for-test"
2233
line_operator = "In-houseWiring"
2334
port_type = "10GBase-LR"
35+
bandwidth = 100
36+
vlan = 1
37+
customer_contact_number = "0"
2438
sign_law = true
25-
vlan = -1
2639
}
2740
```
2841

@@ -58,9 +71,9 @@ In addition to all arguments above, the following attributes are exported:
5871

5972
## Import
6073

61-
dc instance can be imported using the id, e.g.
74+
DC instance can be imported using the id, e.g.
6275

6376
```
64-
terraform import tencentcloud_dc_instance.instance dc_id
77+
terraform import tencentcloud_dc_instance.example dc-ovxsm3u5
6578
```
6679

0 commit comments

Comments
 (0)