From 88bbc7bc499ea9ef73a046d43ce0fd0ead687395 Mon Sep 17 00:00:00 2001 From: SevenEarth <391613297@qq.com> Date: Tue, 4 Mar 2025 10:23:31 +0800 Subject: [PATCH 1/2] add --- .../services/dc/resource_tc_dc_share_dcx_config.go | 12 +++++++----- .../services/dc/resource_tc_dc_share_dcx_config.md | 10 +++++----- website/docs/r/dc_share_dcx_config.html.markdown | 12 ++++++------ 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/tencentcloud/services/dc/resource_tc_dc_share_dcx_config.go b/tencentcloud/services/dc/resource_tc_dc_share_dcx_config.go index 6ee23d56a4..dd1d5f29a8 100644 --- a/tencentcloud/services/dc/resource_tc_dc_share_dcx_config.go +++ b/tencentcloud/services/dc/resource_tc_dc_share_dcx_config.go @@ -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 diff --git a/tencentcloud/services/dc/resource_tc_dc_share_dcx_config.md b/tencentcloud/services/dc/resource_tc_dc_share_dcx_config.md index 6d88645a7d..a80162bd30 100644 --- a/tencentcloud/services/dc/resource_tc_dc_share_dcx_config.md +++ b/tencentcloud/services/dc/resource_tc_dc_share_dcx_config.md @@ -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 ``` \ No newline at end of file diff --git a/website/docs/r/dc_share_dcx_config.html.markdown b/website/docs/r/dc_share_dcx_config.html.markdown index 13f2ce2333..c3091ac34a 100644 --- a/website/docs/r/dc_share_dcx_config.html.markdown +++ b/website/docs/r/dc_share_dcx_config.html.markdown @@ -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 } ``` @@ -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 ``` From 9e3003064f6b4cbffb0030e83aee1f391303fd59 Mon Sep 17 00:00:00 2001 From: SevenEarth <391613297@qq.com> Date: Tue, 4 Mar 2025 10:29:31 +0800 Subject: [PATCH 2/2] add --- .changelog/3180.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/3180.txt diff --git a/.changelog/3180.txt b/.changelog/3180.txt new file mode 100644 index 0000000000..531dff84ba --- /dev/null +++ b/.changelog/3180.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +resource/tencentcloud_dc_share_dcx_config: update doc +``` \ No newline at end of file