Skip to content

Commit 8e94762

Browse files
authored
Feat/support dcx import (#2448)
* feat: support import * feat: support import * feat: changelog * feat: changelog
1 parent 63c0de2 commit 8e94762

File tree

4 files changed

+27
-0
lines changed

4 files changed

+27
-0
lines changed

.changelog/2448.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_dcx: Support import
3+
```

tencentcloud/services/dc/resource_tc_dcx.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ func ResourceTencentCloudDcxInstance() *schema.Resource {
4444
Computed: true,
4545
Description: "Connection owner, who is the current customer by default. The developer account ID should be entered for shared connections.",
4646
},
47+
"network_region": {
48+
Type: schema.TypeString,
49+
Optional: true,
50+
ForceNew: true,
51+
Description: "Network region.",
52+
},
4753
"network_type": {
4854
Type: schema.TypeString,
4955
Optional: true,

tencentcloud/services/dc/resource_tc_dcx.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,13 @@ resource "tencentcloud_dcx" "static_main" {
4242
tencent_address = "100.93.46.1/30"
4343
customer_address = "100.93.46.2/30"
4444
}
45+
46+
47+
```
48+
Import
49+
50+
DCX instance can be imported using the id, e.g.
51+
52+
```
53+
$ terraform import tencentcloud_dcx.foo dcx-cbbr1gjk
4554
```

website/docs/r/dcx.html.markdown

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ The following arguments are supported:
6767
* `bgp_auth_key` - (Optional, String, ForceNew) BGP key of the user.
6868
* `customer_address` - (Optional, String, ForceNew) Interconnect IP of the DC within client.
6969
* `dc_owner_account` - (Optional, String, ForceNew) Connection owner, who is the current customer by default. The developer account ID should be entered for shared connections.
70+
* `network_region` - (Optional, String, ForceNew) Network region.
7071
* `network_type` - (Optional, String, ForceNew) Type of the network. Valid value: `VPC`, `BMVPC` and `CCN`. The default value is `VPC`.
7172
* `route_filter_prefixes` - (Optional, Set: [`String`], ForceNew) Static route, the network address of the user IDC. It can be modified after setting but cannot be deleted. AN unable field within BGP.
7273
* `route_type` - (Optional, String, ForceNew) Type of the route, and available values include BGP and STATIC. The default value is `BGP`.
@@ -83,3 +84,11 @@ In addition to all arguments above, the following attributes are exported:
8384
* `state` - State of the dedicated tunnels. Valid value: `PENDING`, `ALLOCATING`, `ALLOCATED`, `ALTERING`, `DELETING`, `DELETED`, `COMFIRMING` and `REJECTED`.
8485

8586

87+
## Import
88+
89+
DCX instance can be imported using the id, e.g.
90+
91+
```
92+
$ terraform import tencentcloud_dcx.foo dcx-cbbr1gjk
93+
```
94+

0 commit comments

Comments
 (0)