@@ -232,6 +232,35 @@ func resourceTencentCloudTseCngwGateway() *schema.Resource {
232232 Optional : true ,
233233 Description : "Tag description list." ,
234234 },
235+
236+ "instance_port" : {
237+ Computed : true ,
238+ Type : schema .TypeList ,
239+ Description : "Port information that the instance listens to." ,
240+ Elem : & schema.Resource {
241+ Schema : map [string ]* schema.Schema {
242+ "http_port" : {
243+ Type : schema .TypeString ,
244+ Computed : true ,
245+ Description : "Http port range." ,
246+ },
247+ "https_port" : {
248+ Type : schema .TypeString ,
249+ Computed : true ,
250+ Description : "Https port range." ,
251+ },
252+ },
253+ },
254+ },
255+
256+ "public_ip_addresses" : {
257+ Type : schema .TypeSet ,
258+ Elem : & schema.Schema {
259+ Type : schema .TypeString ,
260+ },
261+ Computed : true ,
262+ Description : "Public IP address list." ,
263+ },
235264 },
236265 }
237266}
@@ -465,6 +494,29 @@ func resourceTencentCloudTseCngwGatewayRead(d *schema.ResourceData, meta interfa
465494 _ = d .Set ("trade_type" , cngwGateway .TradeType )
466495 }
467496
497+ if cngwGateway .InstancePort != nil {
498+ instancePortMap := map [string ]interface {}{}
499+
500+ if cngwGateway .InstancePort .HttpPort != nil {
501+ instancePortMap ["http_port" ] = cngwGateway .InstancePort .HttpPort
502+ }
503+
504+ if cngwGateway .InstancePort .HttpsPort != nil {
505+ instancePortMap ["https_port" ] = cngwGateway .InstancePort .HttpsPort
506+ }
507+
508+ _ = d .Set ("instance_port" , []interface {}{instancePortMap })
509+ }
510+
511+ if cngwGateway .PublicIpAddresses != nil {
512+
513+ addresses := make ([]* string , len (cngwGateway .PublicIpAddresses ))
514+
515+ addresses = append (addresses , cngwGateway .PublicIpAddresses ... )
516+
517+ _ = d .Set ("public_ip_addresses" , addresses )
518+ }
519+
468520 tcClient := meta .(* TencentCloudClient ).apiV3Conn
469521 tagService := & TagService {client : tcClient }
470522 tags , err := tagService .DescribeResourceTags (ctx , "tse" , "gateway" , tcClient .Region , d .Id ())
0 commit comments