Skip to content

Commit 712a113

Browse files
committed
add
1 parent ed15a03 commit 712a113

5 files changed

+59
-51
lines changed

tencentcloud/services/dc/resource_tc_dc_instance.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ resource "tencentcloud_dc_instance" "example" {
1616
Or
1717

1818
```hcl
19-
resource "tencentcloud_dc_instance" "instance" {
19+
resource "tencentcloud_dc_instance" "example" {
2020
direct_connect_name = "tf-example"
2121
access_point_id = "ap-shenzhen-b-ft"
2222
line_operator = "In-houseWiring"

tencentcloud/services/dc/resource_tc_dcx_extra_config.go

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,14 @@ func ResourceTencentCloudDcxExtraConfig() *schema.Resource {
3131

3232
"vlan": {
3333
Optional: true,
34+
Computed: true,
3435
Type: schema.TypeInt,
3536
Description: "direct connect tunnel vlan id.",
3637
},
3738

3839
"bgp_peer": {
3940
Optional: true,
41+
Computed: true,
4042
Type: schema.TypeList,
4143
MaxItems: 1,
4244
Description: "idc BGP, Asn, AuthKey.",
@@ -45,11 +47,13 @@ func ResourceTencentCloudDcxExtraConfig() *schema.Resource {
4547
"asn": {
4648
Type: schema.TypeInt,
4749
Optional: true,
50+
Computed: true,
4851
Description: "user idc BGP Asn.",
4952
},
5053
"auth_key": {
5154
Type: schema.TypeString,
5255
Optional: true,
56+
Computed: true,
5357
Description: "user bgp key.",
5458
},
5559
},
@@ -58,6 +62,7 @@ func ResourceTencentCloudDcxExtraConfig() *schema.Resource {
5862

5963
"route_filter_prefixes": {
6064
Optional: true,
65+
Computed: true,
6166
Type: schema.TypeList,
6267
MaxItems: 1,
6368
Description: "user filter network prefixes.",
@@ -66,6 +71,7 @@ func ResourceTencentCloudDcxExtraConfig() *schema.Resource {
6671
"cidr": {
6772
Type: schema.TypeString,
6873
Optional: true,
74+
Computed: true,
6975
Description: "user network prefixes.",
7076
},
7177
},
@@ -74,48 +80,56 @@ func ResourceTencentCloudDcxExtraConfig() *schema.Resource {
7480

7581
"tencent_address": {
7682
Optional: true,
83+
Computed: true,
7784
Type: schema.TypeString,
7885
Description: "direct connect tunnel tencent cloud connect ip.",
7986
},
8087

8188
"tencent_backup_address": {
8289
Optional: true,
90+
Computed: true,
8391
Type: schema.TypeString,
8492
Description: "direct connect tunnel tencent cloud backup connect ip.",
8593
},
8694

8795
"customer_address": {
8896
Optional: true,
97+
Computed: true,
8998
Type: schema.TypeString,
9099
Description: "direct connect tunnel user idc connect ip.",
91100
},
92101

93102
"bandwidth": {
94103
Optional: true,
104+
Computed: true,
95105
Type: schema.TypeInt,
96106
Description: "direct connect tunnel bandwidth.",
97107
},
98108

99109
"enable_bgp_community": {
100110
Optional: true,
111+
Computed: true,
101112
Type: schema.TypeBool,
102113
Description: "BGP community attribute.",
103114
},
104115

105116
"bfd_enable": {
106117
Optional: true,
118+
Computed: true,
107119
Type: schema.TypeInt,
108120
Description: "be enabled BFD.",
109121
},
110122

111123
"nqa_enable": {
112124
Optional: true,
125+
Computed: true,
113126
Type: schema.TypeInt,
114127
Description: "be enabled NQA.",
115128
},
116129

117130
"bfd_info": {
118131
Optional: true,
132+
Computed: true,
119133
Type: schema.TypeList,
120134
MaxItems: 1,
121135
Description: "BFD config info.",
@@ -124,11 +138,13 @@ func ResourceTencentCloudDcxExtraConfig() *schema.Resource {
124138
"probe_failed_times": {
125139
Type: schema.TypeInt,
126140
Optional: true,
141+
Computed: true,
127142
Description: "detect times.",
128143
},
129144
"interval": {
130145
Type: schema.TypeInt,
131146
Optional: true,
147+
Computed: true,
132148
Description: "detect interval.",
133149
},
134150
},
@@ -137,6 +153,7 @@ func ResourceTencentCloudDcxExtraConfig() *schema.Resource {
137153

138154
"nqa_info": {
139155
Optional: true,
156+
Computed: true,
140157
Type: schema.TypeList,
141158
MaxItems: 1,
142159
Description: "NQA config info.",
@@ -145,16 +162,19 @@ func ResourceTencentCloudDcxExtraConfig() *schema.Resource {
145162
"probe_failed_times": {
146163
Type: schema.TypeInt,
147164
Optional: true,
165+
Computed: true,
148166
Description: "detect times.",
149167
},
150168
"interval": {
151169
Type: schema.TypeInt,
152170
Optional: true,
171+
Computed: true,
153172
Description: "detect interval.",
154173
},
155174
"destination_ip": {
156175
Type: schema.TypeString,
157176
Optional: true,
177+
Computed: true,
158178
Description: "detect ip.",
159179
},
160180
},
@@ -163,12 +183,14 @@ func ResourceTencentCloudDcxExtraConfig() *schema.Resource {
163183

164184
"ipv6_enable": {
165185
Optional: true,
186+
Computed: true,
166187
Type: schema.TypeInt,
167188
Description: "0: disable IPv61: enable IPv6.",
168189
},
169190

170191
"jumbo_enable": {
171192
Optional: true,
193+
Computed: true,
172194
Type: schema.TypeInt,
173195
Description: "direct connect tunnel support jumbo frame1: enable direct connect tunnel jumbo frame0: disable direct connect tunnel jumbo frame.",
174196
},
@@ -234,12 +256,10 @@ func resourceTencentCloudDcxExtraConfigRead(d *schema.ResourceData, meta interfa
234256

235257
if dcxExtraConfig.RouteFilterPrefixes != nil {
236258
routeFilterPrefixesMap := map[string]interface{}{}
237-
238-
if dcxExtraConfig.RouteFilterPrefixes != nil {
239-
if len(dcxExtraConfig.RouteFilterPrefixes) > 0 {
240-
routeFilterPrefixesMap["cidr"] = dcxExtraConfig.RouteFilterPrefixes[0].Cidr
241-
}
259+
if len(dcxExtraConfig.RouteFilterPrefixes) > 0 {
260+
routeFilterPrefixesMap["cidr"] = dcxExtraConfig.RouteFilterPrefixes[0].Cidr
242261
}
262+
243263
_ = d.Set("route_filter_prefixes", []interface{}{routeFilterPrefixesMap})
244264
}
245265

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,40 @@
1-
Provides a resource to create a dc dcx_extra_config
1+
Provides a resource to create a DC extra config
22

33
Example Usage
44

55
```hcl
6-
resource "tencentcloud_dcx_extra_config" "dcx_extra_config" {
6+
resource "tencentcloud_dcx_extra_config" "example" {
77
direct_connect_tunnel_id = "dcx-4z49tnws"
88
vlan = 123
9+
tencent_address = "10.3.191.73/29"
10+
tencent_backup_address = "10.3.191.72/29"
11+
customer_address = "10.3.191.74/29"
12+
bandwidth = 100
13+
enable_bgp_community = false
14+
bfd_enable = 1
15+
nqa_enable = 0
916
bgp_peer {
1017
asn = 65101
1118
auth_key = "test123"
12-
13-
}
14-
route_filter_prefixes {
15-
cidr = "192.168.0.0/24"
1619
}
17-
tencent_address = "192.168.1.1"
18-
tencent_backup_address = "192.168.1.2"
19-
customer_address = "192.168.1.4"
20-
bandwidth = 10
21-
enable_bgp_community = false
22-
bfd_enable = 0
23-
nqa_enable = 1
2420
bfd_info {
2521
probe_failed_times = 3
26-
interval = 100
27-
22+
interval = 2000
2823
}
2924
nqa_info {
30-
probe_failed_times = 3
31-
interval = 100
32-
destination_ip = "192.168.2.2"
33-
25+
probe_failed_times = -1
26+
interval = -1
27+
destination_ip = "0.0.0.0"
3428
}
35-
ipv6_enable = 0
29+
ipv6_enable = 0
3630
jumbo_enable = 0
3731
}
3832
```
3933

4034
Import
4135

42-
dc dcx_extra_config can be imported using the id, e.g.
36+
DC extra config can be imported using the id, e.g.
4337

4438
```
45-
terraform import tencentcloud_dcx_extra_config.dcx_extra_config dcx_id
39+
terraform import tencentcloud_dcx_extra_config.example dcx-4z49tnws
4640
```

website/docs/r/dc_instance.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ resource "tencentcloud_dc_instance" "example" {
2727
### Or
2828

2929
```hcl
30-
resource "tencentcloud_dc_instance" "instance" {
30+
resource "tencentcloud_dc_instance" "example" {
3131
direct_connect_name = "tf-example"
3232
access_point_id = "ap-shenzhen-b-ft"
3333
line_operator = "In-houseWiring"

website/docs/r/dcx_extra_config.html.markdown

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,44 +4,38 @@ layout: "tencentcloud"
44
page_title: "TencentCloud: tencentcloud_dcx_extra_config"
55
sidebar_current: "docs-tencentcloud-resource-dcx_extra_config"
66
description: |-
7-
Provides a resource to create a dc dcx_extra_config
7+
Provides a resource to create a DC extra config
88
---
99

1010
# tencentcloud_dcx_extra_config
1111

12-
Provides a resource to create a dc dcx_extra_config
12+
Provides a resource to create a DC extra config
1313

1414
## Example Usage
1515

1616
```hcl
17-
resource "tencentcloud_dcx_extra_config" "dcx_extra_config" {
17+
resource "tencentcloud_dcx_extra_config" "example" {
1818
direct_connect_tunnel_id = "dcx-4z49tnws"
1919
vlan = 123
20+
tencent_address = "10.3.191.73/29"
21+
tencent_backup_address = "10.3.191.72/29"
22+
customer_address = "10.3.191.74/29"
23+
bandwidth = 100
24+
enable_bgp_community = false
25+
bfd_enable = 1
26+
nqa_enable = 0
2027
bgp_peer {
2128
asn = 65101
2229
auth_key = "test123"
23-
24-
}
25-
route_filter_prefixes {
26-
cidr = "192.168.0.0/24"
2730
}
28-
tencent_address = "192.168.1.1"
29-
tencent_backup_address = "192.168.1.2"
30-
customer_address = "192.168.1.4"
31-
bandwidth = 10
32-
enable_bgp_community = false
33-
bfd_enable = 0
34-
nqa_enable = 1
3531
bfd_info {
3632
probe_failed_times = 3
37-
interval = 100
38-
33+
interval = 2000
3934
}
4035
nqa_info {
41-
probe_failed_times = 3
42-
interval = 100
43-
destination_ip = "192.168.2.2"
44-
36+
probe_failed_times = -1
37+
interval = -1
38+
destination_ip = "0.0.0.0"
4539
}
4640
ipv6_enable = 0
4741
jumbo_enable = 0
@@ -98,9 +92,9 @@ In addition to all arguments above, the following attributes are exported:
9892

9993
## Import
10094

101-
dc dcx_extra_config can be imported using the id, e.g.
95+
DC extra config can be imported using the id, e.g.
10296

10397
```
104-
terraform import tencentcloud_dcx_extra_config.dcx_extra_config dcx_id
98+
terraform import tencentcloud_dcx_extra_config.example dcx-4z49tnws
10599
```
106100

0 commit comments

Comments
 (0)