Skip to content

fix(vpc): [136878665] tencentcloud_ha_vips fix the issue of failed filtering queries #3098

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
Jan 22, 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/3098.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
datasource/tencentcloud_ha_vips: fix the issue of failed filtering queries
```
2 changes: 1 addition & 1 deletion tencentcloud/services/vpc/data_source_tc_ha_vips.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ func dataSourceTencentCloudHaVipsRead(d *schema.ResourceData, meta interface{})
params["subnet-id"] = v.(string)
}
if v, ok := d.GetOk("vpc_id"); ok {
params["vpc-ip"] = v.(string)
params["vpc-id"] = v.(string)
}
request.Filters = make([]*vpc.Filter, 0, len(params))
for k, v := range params {
Expand Down
32 changes: 24 additions & 8 deletions tencentcloud/services/vpc/data_source_tc_ha_vips.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,28 @@ Use this data source to query detailed information of HA VIPs.

Example Usage

Query all HA vips

```hcl
data "tencentcloud_ha_vips" "ha_vips" {}
```

Query HA vips by filters

```hcl
data "tencentcloud_ha_vips" "havips" {
id = "havip-kjqwe4ba"
name = "test"
vpc_id = "vpc-gzea3dd7"
subnet_id = "subnet-4d4m4cd4"
address_ip = "10.0.4.16"
}
```
data "tencentcloud_ha_vips" "ha_vips" {
name = "tf-example"
}

data "tencentcloud_ha_vips" "ha_vips" {
id = "havip-rg9y1k2c"
}

data "tencentcloud_ha_vips" "ha_vips" {
vpc_id = "vpc-q23dnivj"
}

data "tencentcloud_ha_vips" "ha_vips" {
subnet_id = "subnet-g6c7yi7o"
}
```
28 changes: 22 additions & 6 deletions website/docs/d/ha_vips.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,29 @@ Use this data source to query detailed information of HA VIPs.

## Example Usage

### Query all HA vips

```hcl
data "tencentcloud_ha_vips" "ha_vips" {}
```

### Query HA vips by filters

```hcl
data "tencentcloud_ha_vips" "havips" {
id = "havip-kjqwe4ba"
name = "test"
vpc_id = "vpc-gzea3dd7"
subnet_id = "subnet-4d4m4cd4"
address_ip = "10.0.4.16"
data "tencentcloud_ha_vips" "ha_vips" {
name = "tf-example"
}

data "tencentcloud_ha_vips" "ha_vips" {
id = "havip-rg9y1k2c"
}

data "tencentcloud_ha_vips" "ha_vips" {
vpc_id = "vpc-q23dnivj"
}

data "tencentcloud_ha_vips" "ha_vips" {
subnet_id = "subnet-g6c7yi7o"
}
```

Expand Down
Loading