From f6f56574a8ba49dcc6f2f290094a37bdf5518764 Mon Sep 17 00:00:00 2001 From: arunma Date: Tue, 15 Apr 2025 15:55:57 +0800 Subject: [PATCH 1/2] fix(clb): [123510686] Supported fields: numerical_vpc_id --- .../services/clb/data_source_tc_clb_instances.go | 9 +++++++++ .../services/clb/data_source_tc_clb_instances_test.go | 1 + website/docs/d/clb_instances.html.markdown | 1 + 3 files changed, 11 insertions(+) diff --git a/tencentcloud/services/clb/data_source_tc_clb_instances.go b/tencentcloud/services/clb/data_source_tc_clb_instances.go index c0b6274a47..aa8a2bdcdc 100644 --- a/tencentcloud/services/clb/data_source_tc_clb_instances.go +++ b/tencentcloud/services/clb/data_source_tc_clb_instances.go @@ -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.", + }, }, }, }, @@ -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) } diff --git a/tencentcloud/services/clb/data_source_tc_clb_instances_test.go b/tencentcloud/services/clb/data_source_tc_clb_instances_test.go index 9661ce801c..9a4721cd76 100644 --- a/tencentcloud/services/clb/data_source_tc_clb_instances_test.go +++ b/tencentcloud/services/clb/data_source_tc_clb_instances_test.go @@ -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"), ), }, }, diff --git a/website/docs/d/clb_instances.html.markdown b/website/docs/d/clb_instances.html.markdown index 3e8a5b98a1..c059815b75 100644 --- a/website/docs/d/clb_instances.html.markdown +++ b/website/docs/d/clb_instances.html.markdown @@ -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. From ccf7f2f0b795935588f20415b3769e09cf3ce3b7 Mon Sep 17 00:00:00 2001 From: arunma Date: Tue, 15 Apr 2025 15:57:44 +0800 Subject: [PATCH 2/2] fix: add changelog --- .changelog/3307.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/3307.txt diff --git a/.changelog/3307.txt b/.changelog/3307.txt new file mode 100644 index 0000000000..f91fbe0299 --- /dev/null +++ b/.changelog/3307.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +datasource/tencentcloud_clb_instances: Supported fields `numerical_vpc_id`. +``` \ No newline at end of file