diff --git a/.changelog/3273.txt b/.changelog/3273.txt new file mode 100644 index 0000000000..62543d0812 --- /dev/null +++ b/.changelog/3273.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +resource/tencentcloud_vpn_customer_gateways: update code and doc +``` \ No newline at end of file diff --git a/.changelog/3274.txt b/.changelog/3274.txt new file mode 100644 index 0000000000..c8ed63a73f --- /dev/null +++ b/.changelog/3274.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +datasource/tencentcloud_vpn_gateway_routes: update doc +``` \ No newline at end of file diff --git a/tencentcloud/services/vpn/data_source_tc_vpn_customer_gateways.go b/tencentcloud/services/vpn/data_source_tc_vpn_customer_gateways.go index 1902717a7b..2539b9b7f8 100644 --- a/tencentcloud/services/vpn/data_source_tc_vpn_customer_gateways.go +++ b/tencentcloud/services/vpn/data_source_tc_vpn_customer_gateways.go @@ -89,7 +89,7 @@ func DataSourceTencentCloudVpnCustomerGateways() *schema.Resource { } func dataSourceTencentCloudVpnCustomerGatewaysRead(d *schema.ResourceData, meta interface{}) error { - defer tccommon.LogElapsed("data_source.tencentcloud_customer_gateways.read")() + defer tccommon.LogElapsed("data_source.tencentcloud_vpn_customer_gateways.read")() logId := tccommon.GetLogId(tccommon.ContextNil) ctx := context.WithValue(context.TODO(), tccommon.LogIdKey, logId) diff --git a/tencentcloud/services/vpn/data_source_tc_vpn_customer_gateways.md b/tencentcloud/services/vpn/data_source_tc_vpn_customer_gateways.md index 824d63eb20..8543c9fc46 100644 --- a/tencentcloud/services/vpn/data_source_tc_vpn_customer_gateways.md +++ b/tencentcloud/services/vpn/data_source_tc_vpn_customer_gateways.md @@ -2,13 +2,21 @@ Use this data source to query detailed information of VPN customer gateways. Example Usage +Query all customer gateways + +```hcl +data "tencentcloud_vpn_customer_gateways" "example" {} +``` + +Query customer gateways by filters + ```hcl -data "tencentcloud_customer_gateways" "foo" { - name = "main" - id = "cgw-xfqag" +data "tencentcloud_vpn_customer_gateways" "example" { + name = "tf-example" + id = "cgw-r1g6c8fr" public_ip_address = "1.1.1.1" tags = { - test = "tf" + createBy = "Terraform" } } -``` \ No newline at end of file +``` diff --git a/tencentcloud/services/vpn/data_source_tc_vpn_gateway_routes.md b/tencentcloud/services/vpn/data_source_tc_vpn_gateway_routes.md index 554a28be40..69f0ae14bb 100644 --- a/tencentcloud/services/vpn/data_source_tc_vpn_gateway_routes.md +++ b/tencentcloud/services/vpn/data_source_tc_vpn_gateway_routes.md @@ -1,15 +1,12 @@ -Use this data source to query detailed information of VPN gateways. +Use this data source to query detailed information of VPN gateways routes. Example Usage ```hcl -data "tencentcloud_vpn_gateways" "foo" { - vpn_gateway_id = "main" - destination_cidr_block = "vpngw-8ccsnclt" - instance_type = "1.1.1.1" - instance_id = "ap-guangzhou-3" - tags = { - test = "tf" - } +data "tencentcloud_vpn_gateway_routes" "example" { + vpn_gateway_id = "vpngw-8dua3tbl" + destination_cidr = "10.0.0.0/8" + instance_type = "VPNCONN" + instance_id = "vpnx-m16m4sw4" } ``` \ No newline at end of file diff --git a/website/docs/d/vpn_customer_gateways.html.markdown b/website/docs/d/vpn_customer_gateways.html.markdown index 2b583a9bfa..63e81baad2 100644 --- a/website/docs/d/vpn_customer_gateways.html.markdown +++ b/website/docs/d/vpn_customer_gateways.html.markdown @@ -13,13 +13,21 @@ Use this data source to query detailed information of VPN customer gateways. ## Example Usage +### Query all customer gateways + +```hcl +data "tencentcloud_vpn_customer_gateways" "example" {} +``` + +### Query customer gateways by filters + ```hcl -data "tencentcloud_customer_gateways" "foo" { - name = "main" - id = "cgw-xfqag" +data "tencentcloud_vpn_customer_gateways" "example" { + name = "tf-example" + id = "cgw-r1g6c8fr" public_ip_address = "1.1.1.1" tags = { - test = "tf" + createBy = "Terraform" } } ``` diff --git a/website/docs/d/vpn_gateway_routes.html.markdown b/website/docs/d/vpn_gateway_routes.html.markdown index 20acbdacc6..164b69c02d 100644 --- a/website/docs/d/vpn_gateway_routes.html.markdown +++ b/website/docs/d/vpn_gateway_routes.html.markdown @@ -4,24 +4,21 @@ layout: "tencentcloud" page_title: "TencentCloud: tencentcloud_vpn_gateway_routes" sidebar_current: "docs-tencentcloud-datasource-vpn_gateway_routes" description: |- - Use this data source to query detailed information of VPN gateways. + Use this data source to query detailed information of VPN gateways routes. --- # tencentcloud_vpn_gateway_routes -Use this data source to query detailed information of VPN gateways. +Use this data source to query detailed information of VPN gateways routes. ## Example Usage ```hcl -data "tencentcloud_vpn_gateways" "foo" { - vpn_gateway_id = "main" - destination_cidr_block = "vpngw-8ccsnclt" - instance_type = "1.1.1.1" - instance_id = "ap-guangzhou-3" - tags = { - test = "tf" - } +data "tencentcloud_vpn_gateway_routes" "example" { + vpn_gateway_id = "vpngw-8dua3tbl" + destination_cidr = "10.0.0.0/8" + instance_type = "VPNCONN" + instance_id = "vpnx-m16m4sw4" } ```