Skip to content

Commit c23c04a

Browse files
authored
fix(vpc): [136878665] tencentcloud_ha_vips fix the issue of failed filtering queries (#3098)
* add * add
1 parent 67eeb4f commit c23c04a

File tree

4 files changed

+50
-15
lines changed

4 files changed

+50
-15
lines changed

.changelog/3098.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_ha_vips: fix the issue of failed filtering queries
3+
```

tencentcloud/services/vpc/data_source_tc_ha_vips.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ func dataSourceTencentCloudHaVipsRead(d *schema.ResourceData, meta interface{})
136136
params["subnet-id"] = v.(string)
137137
}
138138
if v, ok := d.GetOk("vpc_id"); ok {
139-
params["vpc-ip"] = v.(string)
139+
params["vpc-id"] = v.(string)
140140
}
141141
request.Filters = make([]*vpc.Filter, 0, len(params))
142142
for k, v := range params {

tencentcloud/services/vpc/data_source_tc_ha_vips.md

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,28 @@ Use this data source to query detailed information of HA VIPs.
22

33
Example Usage
44

5+
Query all HA vips
6+
7+
```hcl
8+
data "tencentcloud_ha_vips" "ha_vips" {}
9+
```
10+
11+
Query HA vips by filters
12+
513
```hcl
6-
data "tencentcloud_ha_vips" "havips" {
7-
id = "havip-kjqwe4ba"
8-
name = "test"
9-
vpc_id = "vpc-gzea3dd7"
10-
subnet_id = "subnet-4d4m4cd4"
11-
address_ip = "10.0.4.16"
12-
}
13-
```
14+
data "tencentcloud_ha_vips" "ha_vips" {
15+
name = "tf-example"
16+
}
17+
18+
data "tencentcloud_ha_vips" "ha_vips" {
19+
id = "havip-rg9y1k2c"
20+
}
21+
22+
data "tencentcloud_ha_vips" "ha_vips" {
23+
vpc_id = "vpc-q23dnivj"
24+
}
25+
26+
data "tencentcloud_ha_vips" "ha_vips" {
27+
subnet_id = "subnet-g6c7yi7o"
28+
}
29+
```

website/docs/d/ha_vips.html.markdown

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,29 @@ Use this data source to query detailed information of HA VIPs.
1313

1414
## Example Usage
1515

16+
### Query all HA vips
17+
18+
```hcl
19+
data "tencentcloud_ha_vips" "ha_vips" {}
20+
```
21+
22+
### Query HA vips by filters
23+
1624
```hcl
17-
data "tencentcloud_ha_vips" "havips" {
18-
id = "havip-kjqwe4ba"
19-
name = "test"
20-
vpc_id = "vpc-gzea3dd7"
21-
subnet_id = "subnet-4d4m4cd4"
22-
address_ip = "10.0.4.16"
25+
data "tencentcloud_ha_vips" "ha_vips" {
26+
name = "tf-example"
27+
}
28+
29+
data "tencentcloud_ha_vips" "ha_vips" {
30+
id = "havip-rg9y1k2c"
31+
}
32+
33+
data "tencentcloud_ha_vips" "ha_vips" {
34+
vpc_id = "vpc-q23dnivj"
35+
}
36+
37+
data "tencentcloud_ha_vips" "ha_vips" {
38+
subnet_id = "subnet-g6c7yi7o"
2339
}
2440
```
2541

0 commit comments

Comments
 (0)