Skip to content

fix(dc): [137724699] tencentcloud_dc_share_dcx_config update doc #3180

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/3180.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
resource/tencentcloud_dc_share_dcx_config: update doc
```
12 changes: 7 additions & 5 deletions tencentcloud/services/dc/resource_tc_dc_share_dcx_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,14 @@ func resourceTencentCloudDcShareDcxConfigRead(d *schema.ResourceData, meta inter
_ = d.Set("direct_connect_tunnel_id", ShareDcxConfig.DirectConnectTunnelId)
}

if *ShareDcxConfig.State == "AVAILABLE" {
_ = d.Set("enable", true)
}
if ShareDcxConfig.State != nil {
if *ShareDcxConfig.State == "AVAILABLE" {
_ = d.Set("enable", true)
}

if *ShareDcxConfig.State == "REJECTED" {
_ = d.Set("enable", false)
if *ShareDcxConfig.State == "REJECTED" {
_ = d.Set("enable", false)
}
}

return nil
Expand Down
10 changes: 5 additions & 5 deletions tencentcloud/services/dc/resource_tc_dc_share_dcx_config.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
Provides a resource to create a dc share_dcx_config
Provides a resource to create a dc share dcx config

Example Usage

```hcl
resource "tencentcloud_dc_share_dcx_config" "share_dcx_config" {
resource "tencentcloud_dc_share_dcx_config" "example" {
direct_connect_tunnel_id = "dcx-4z49tnws"
enable = false
enable = true
}
```

Import

dc share_dcx_config can be imported using the id, e.g.
dc share dcx config can be imported using the id, e.g.

```
terraform import tencentcloud_dc_share_dcx_config.share_dcx_config dcx_id
terraform import tencentcloud_dc_share_dcx_config.example dcx-4z49tnws
```
12 changes: 6 additions & 6 deletions website/docs/r/dc_share_dcx_config.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ layout: "tencentcloud"
page_title: "TencentCloud: tencentcloud_dc_share_dcx_config"
sidebar_current: "docs-tencentcloud-resource-dc_share_dcx_config"
description: |-
Provides a resource to create a dc share_dcx_config
Provides a resource to create a dc share dcx config
---

# tencentcloud_dc_share_dcx_config

Provides a resource to create a dc share_dcx_config
Provides a resource to create a dc share dcx config

## Example Usage

```hcl
resource "tencentcloud_dc_share_dcx_config" "share_dcx_config" {
resource "tencentcloud_dc_share_dcx_config" "example" {
direct_connect_tunnel_id = "dcx-4z49tnws"
enable = false
enable = true
}
```

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

## Import

dc share_dcx_config can be imported using the id, e.g.
dc share dcx config can be imported using the id, e.g.

```
terraform import tencentcloud_dc_share_dcx_config.share_dcx_config dcx_id
terraform import tencentcloud_dc_share_dcx_config.example dcx-4z49tnws
```

Loading