Skip to content

Commit dbf238a

Browse files
authored
fix(vpn): [138463021] tencentcloud_vpn_connections update code and doc (#3272)
* add * add
1 parent 9c91682 commit dbf238a

File tree

4 files changed

+33
-13
lines changed

4 files changed

+33
-13
lines changed

.changelog/3272.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:enhancement
2+
datasource/tencentcloud_vpn_connections: update code and doc
3+
```

tencentcloud/services/vpn/data_source_tc_vpn_connections.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,7 @@ func dataSourceTencentCloudVpnConnectionsRead(d *schema.ResourceData, meta inter
326326
mapping := map[string]interface{}{
327327
"id": *connection.VpnConnectionId,
328328
"name": *connection.VpnConnectionName,
329+
"vpc_id": *connection.VpcId,
329330
"vpn_gateway_id": *connection.VpnGatewayId,
330331
"customer_gateway_id": *connection.CustomerGatewayId,
331332
"ike_proto_authen_algorithm": *connection.IKEOptionsSpecification.PropoAuthenAlgorithm,

tencentcloud/services/vpn/data_source_tc_vpn_connections.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,23 @@ Use this data source to query detailed information of VPN connections.
22

33
Example Usage
44

5+
Query all vpn connections
6+
7+
```hcl
8+
data "tencentcloud_vpn_connections" "example" {}
9+
```
10+
11+
Query vpn connections by filters
12+
513
```hcl
6-
data "tencentcloud_vpn_connections" "foo" {
7-
name = "main"
8-
id = "vpnx-xfqag"
14+
data "tencentcloud_vpn_connections" "example" {
15+
name = "tf-example"
16+
id = "vpnx-fq4e4364"
917
vpn_gateway_id = "vpngw-8ccsnclt"
10-
vpc_id = "cgw-xfqag"
11-
customer_gateway_id = ""
18+
vpc_id = "vpc-6ccw0s5l"
19+
customer_gateway_id = "cgw-r1g6c8fr"
1220
tags = {
13-
test = "tf"
21+
createBy = "Terraform"
1422
}
1523
}
16-
```
24+
```

website/docs/d/vpn_connections.html.markdown

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,23 @@ Use this data source to query detailed information of VPN connections.
1313

1414
## Example Usage
1515

16+
### Query all vpn connections
17+
18+
```hcl
19+
data "tencentcloud_vpn_connections" "example" {}
20+
```
21+
22+
### Query vpn connections by filters
23+
1624
```hcl
17-
data "tencentcloud_vpn_connections" "foo" {
18-
name = "main"
19-
id = "vpnx-xfqag"
25+
data "tencentcloud_vpn_connections" "example" {
26+
name = "tf-example"
27+
id = "vpnx-fq4e4364"
2028
vpn_gateway_id = "vpngw-8ccsnclt"
21-
vpc_id = "cgw-xfqag"
22-
customer_gateway_id = ""
29+
vpc_id = "vpc-6ccw0s5l"
30+
customer_gateway_id = "cgw-r1g6c8fr"
2331
tags = {
24-
test = "tf"
32+
createBy = "Terraform"
2533
}
2634
}
2735
```

0 commit comments

Comments
 (0)