@@ -56,6 +56,11 @@ func dataSourceTencentCloudClbInstances() *schema.Resource {
5656 Optional : true ,
5757 Description : "Used to save results." ,
5858 },
59+ "master_zone" : {
60+ Type : schema .TypeString ,
61+ Optional : true ,
62+ Description : "Master available zone id." ,
63+ },
5964 "clb_list" : {
6065 Type : schema .TypeList ,
6166 Computed : true ,
@@ -154,6 +159,31 @@ func dataSourceTencentCloudClbInstances() *schema.Resource {
154159 Computed : true ,
155160 Description : "Max bandwidth out, only applicable to open CLB. Valid value ranges is [1, 2048]. Unit is MB." ,
156161 },
162+ "zone_id" : {
163+ Type : schema .TypeInt ,
164+ Computed : true ,
165+ Description : "Available zone unique id(numerical representation), This field maybe null, means cannot get a valid value" ,
166+ },
167+ "zone" : {
168+ Type : schema .TypeString ,
169+ Computed : true ,
170+ Description : "Available zone unique id(string representation), This field maybe null, means cannot get a valid value" ,
171+ },
172+ "zone_name" : {
173+ Type : schema .TypeString ,
174+ Computed : true ,
175+ Description : "Available zone name, This field maybe null, means cannot get a valid value" ,
176+ },
177+ "zone_region" : {
178+ Type : schema .TypeString ,
179+ Computed : true ,
180+ Description : "Region that this available zone belong to, This field maybe null, means cannot get a valid value" ,
181+ },
182+ "local_zone" : {
183+ Type : schema .TypeBool ,
184+ Computed : true ,
185+ Description : "Whether this available zone is local zone, This field maybe null, means cannot get a valid value" ,
186+ },
157187 },
158188 },
159189 },
@@ -180,6 +210,9 @@ func dataSourceTencentCloudClbInstancesRead(d *schema.ResourceData, meta interfa
180210 if v , ok := d .GetOk ("network_type" ); ok {
181211 params ["network_type" ] = v .(string )
182212 }
213+ if v , ok := d .GetOk ("master_zone" ); ok {
214+ params ["master_zone" ] = v .(string )
215+ }
183216
184217 clbService := ClbService {
185218 client : meta .(* TencentCloudClient ).apiV3Conn ,
@@ -221,6 +254,14 @@ func dataSourceTencentCloudClbInstancesRead(d *schema.ResourceData, meta interfa
221254 mapping ["internet_charge_type" ] = * clbInstance .NetworkAttributes .InternetChargeType
222255 mapping ["internet_bandwidth_max_out" ] = * clbInstance .NetworkAttributes .InternetMaxBandwidthOut
223256 }
257+ if clbInstance .MasterZone != nil {
258+ mapping ["zone_id" ] = * clbInstance .MasterZone .ZoneId
259+ mapping ["zone" ] = * clbInstance .MasterZone .Zone
260+ mapping ["zone_name" ] = * clbInstance .MasterZone .ZoneName
261+ mapping ["zone_region" ] = * clbInstance .MasterZone .ZoneRegion
262+ mapping ["local_zone" ] = * clbInstance .MasterZone .LocalZone
263+ }
264+
224265 if clbInstance .Tags != nil {
225266 tags := make (map [string ]interface {}, len (clbInstance .Tags ))
226267 for _ , t := range clbInstance .Tags {
0 commit comments