Skip to content

fix(clb): [123510686] Supported fields: numerical_vpc_id #3307

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
Apr 16, 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/3307.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
datasource/tencentcloud_clb_instances: Supported fields `numerical_vpc_id`.
```
9 changes: 9 additions & 0 deletions tencentcloud/services/clb/data_source_tc_clb_instances.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,11 @@ func DataSourceTencentCloudClbInstances() *schema.Resource {
Computed: true,
Description: "Whether this available zone is local zone, This field maybe null, means cannot get a valid value.",
},
"numerical_vpc_id": {
Type: schema.TypeInt,
Computed: true,
Description: "VPC ID in a numeric form. Note: This field may return null, indicating that no valid values can be obtained.",
},
},
},
},
Expand Down Expand Up @@ -277,6 +282,10 @@ func dataSourceTencentCloudClbInstancesRead(d *schema.ResourceData, meta interfa
mapping["tags"] = tags
}

if clbInstance.NumericalVpcId != nil {
mapping["numerical_vpc_id"] = clbInstance.NumericalVpcId
}

clbList = append(clbList, mapping)
ids = append(ids, *clbInstance.LoadBalancerId)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ func TestAccTencentCloudClbInstancesDataSource_internal(t *testing.T) {
resource.TestCheckResourceAttrSet("data.tencentcloud_clb_instances.clbs", "clb_list.0.status_time"),
resource.TestCheckResourceAttrSet("data.tencentcloud_clb_instances.clbs", "clb_list.0.status"),
resource.TestCheckResourceAttr("data.tencentcloud_clb_instances.clbs", "clb_list.0.tags.test", "tf"),
resource.TestCheckResourceAttrSet("data.tencentcloud_clb_instances.clbs", "clb_list.0.numerical_vpc_id"),
),
},
},
Expand Down
1 change: 1 addition & 0 deletions website/docs/d/clb_instances.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ In addition to all arguments above, the following attributes are exported:
* `internet_charge_type` - Internet charge type, only applicable to open CLB. Valid values are `TRAFFIC_POSTPAID_BY_HOUR`, `BANDWIDTH_POSTPAID_BY_HOUR` and `BANDWIDTH_PACKAGE`.
* `local_zone` - Whether this available zone is local zone, This field maybe null, means cannot get a valid value.
* `network_type` - Types of CLB.
* `numerical_vpc_id` - VPC ID in a numeric form. Note: This field may return null, indicating that no valid values can be obtained.
* `project_id` - ID of the project.
* `security_groups` - ID set of the security groups.
* `status_time` - Latest state transition time of CLB.
Expand Down
Loading