Skip to content

Commit 6793f6f

Browse files
authored
fix(dc): [137724699] tencentcloud_dc_share_dcx_config update doc (#3180)
* add * add
1 parent 31b5932 commit 6793f6f

File tree

4 files changed

+21
-16
lines changed

4 files changed

+21
-16
lines changed

.changelog/3180.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_share_dcx_config: update doc
3+
```

tencentcloud/services/dc/resource_tc_dc_share_dcx_config.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,14 @@ func resourceTencentCloudDcShareDcxConfigRead(d *schema.ResourceData, meta inter
7474
_ = d.Set("direct_connect_tunnel_id", ShareDcxConfig.DirectConnectTunnelId)
7575
}
7676

77-
if *ShareDcxConfig.State == "AVAILABLE" {
78-
_ = d.Set("enable", true)
79-
}
77+
if ShareDcxConfig.State != nil {
78+
if *ShareDcxConfig.State == "AVAILABLE" {
79+
_ = d.Set("enable", true)
80+
}
8081

81-
if *ShareDcxConfig.State == "REJECTED" {
82-
_ = d.Set("enable", false)
82+
if *ShareDcxConfig.State == "REJECTED" {
83+
_ = d.Set("enable", false)
84+
}
8385
}
8486

8587
return nil
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
Provides a resource to create a dc share_dcx_config
1+
Provides a resource to create a dc share dcx config
22

33
Example Usage
44

55
```hcl
6-
resource "tencentcloud_dc_share_dcx_config" "share_dcx_config" {
6+
resource "tencentcloud_dc_share_dcx_config" "example" {
77
direct_connect_tunnel_id = "dcx-4z49tnws"
8-
enable = false
8+
enable = true
99
}
1010
```
1111

1212
Import
1313

14-
dc share_dcx_config can be imported using the id, e.g.
14+
dc share dcx config can be imported using the id, e.g.
1515

1616
```
17-
terraform import tencentcloud_dc_share_dcx_config.share_dcx_config dcx_id
17+
terraform import tencentcloud_dc_share_dcx_config.example dcx-4z49tnws
1818
```

website/docs/r/dc_share_dcx_config.html.markdown

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@ layout: "tencentcloud"
44
page_title: "TencentCloud: tencentcloud_dc_share_dcx_config"
55
sidebar_current: "docs-tencentcloud-resource-dc_share_dcx_config"
66
description: |-
7-
Provides a resource to create a dc share_dcx_config
7+
Provides a resource to create a dc share dcx config
88
---
99

1010
# tencentcloud_dc_share_dcx_config
1111

12-
Provides a resource to create a dc share_dcx_config
12+
Provides a resource to create a dc share dcx config
1313

1414
## Example Usage
1515

1616
```hcl
17-
resource "tencentcloud_dc_share_dcx_config" "share_dcx_config" {
17+
resource "tencentcloud_dc_share_dcx_config" "example" {
1818
direct_connect_tunnel_id = "dcx-4z49tnws"
19-
enable = false
19+
enable = true
2020
}
2121
```
2222

@@ -37,9 +37,9 @@ In addition to all arguments above, the following attributes are exported:
3737

3838
## Import
3939

40-
dc share_dcx_config can be imported using the id, e.g.
40+
dc share dcx config can be imported using the id, e.g.
4141

4242
```
43-
terraform import tencentcloud_dc_share_dcx_config.share_dcx_config dcx_id
43+
terraform import tencentcloud_dc_share_dcx_config.example dcx-4z49tnws
4444
```
4545

0 commit comments

Comments
 (0)