Skip to content

Commit d5172f7

Browse files
authored
feat(proxy): [124743455]add IsAutoScaleProxy (#3410)
* add IsAutoScaleProxy * add IsAutoScaleProxy
1 parent 0ea9657 commit d5172f7

File tree

5 files changed

+40
-14
lines changed

5 files changed

+40
-14
lines changed

.changelog/3410.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
```release-note:enhancement
2+
datasource/tencentcloud_gaap_proxy_detail: support `is_auto_scale_proxy`
3+
```
4+
5+
```release-note:enhancement
6+
datasource/tencentcloud_gaap_proxies: support `is_auto_scale_proxy`
7+
```

tencentcloud/services/gaap/data_source_tc_gaap_proxies.go

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,11 @@ func DataSourceTencentCloudGaapProxies() *schema.Resource {
143143
Computed: true,
144144
Description: "Version of the GAAP proxy.",
145145
},
146+
"is_auto_scale_proxy": {
147+
Type: schema.TypeInt,
148+
Computed: true,
149+
Description: "Indicates whether the auto scale channel is enabled, with 0 for no and 1 for yes.",
150+
},
146151
"tags": {
147152
Type: schema.TypeMap,
148153
Computed: true,
@@ -244,24 +249,28 @@ func dataSourceTencentCloudGaapProxiesRead(d *schema.ResourceData, m interface{}
244249
if proxy.Version == nil {
245250
return errors.New("proxy version is nil")
246251
}
252+
if proxy.IsAutoScaleProxy == nil {
253+
return errors.New("proxy IsAutoScaleProxy is nil")
254+
}
247255

248256
proxyIds = append(proxyIds, *proxy.ProxyId)
249257

250258
m := map[string]interface{}{
251-
"id": *proxy.ProxyId,
252-
"name": *proxy.ProxyName,
253-
"domain": *proxy.Domain,
254-
"ip": *proxy.IP,
255-
"bandwidth": *proxy.Bandwidth,
256-
"concurrent": *proxy.Concurrent,
257-
"access_region": *proxy.AccessRegion,
258-
"realserver_region": *proxy.RealServerRegion,
259-
"project_id": *proxy.ProjectId,
260-
"create_time": helper.FormatUnixTime(*proxy.CreateTime),
261-
"status": *proxy.Status,
262-
"scalable": *proxy.Scalarable == 1,
263-
"forward_ip": *proxy.ForwardIP,
264-
"version": *proxy.Version,
259+
"id": *proxy.ProxyId,
260+
"name": *proxy.ProxyName,
261+
"domain": *proxy.Domain,
262+
"ip": *proxy.IP,
263+
"bandwidth": *proxy.Bandwidth,
264+
"concurrent": *proxy.Concurrent,
265+
"access_region": *proxy.AccessRegion,
266+
"realserver_region": *proxy.RealServerRegion,
267+
"project_id": *proxy.ProjectId,
268+
"create_time": helper.FormatUnixTime(*proxy.CreateTime),
269+
"status": *proxy.Status,
270+
"scalable": *proxy.Scalarable == 1,
271+
"forward_ip": *proxy.ForwardIP,
272+
"version": *proxy.Version,
273+
"is_auto_scale_proxy": *proxy.IsAutoScaleProxy,
265274
}
266275

267276
if proxy.PolicyId != nil {

tencentcloud/services/gaap/data_source_tc_gaap_proxy_detail.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,11 @@ func DataSourceTencentCloudGaapProxyDetail() *schema.Resource {
350350
Computed: true,
351351
Description: "Whether to allow TLS configuration.0-no support, 1-expressed support.",
352352
},
353+
"is_auto_scale_proxy": {
354+
Type: schema.TypeInt,
355+
Computed: true,
356+
Description: "Indicates whether the auto scale channel is enabled, with 0 for no and 1 for yes.",
357+
},
353358
},
354359
},
355360
},
@@ -637,6 +642,9 @@ func dataSourceTencentCloudGaapProxyDetailRead(d *schema.ResourceData, meta inte
637642
if proxyDetail.IsSupportTLSChoice != nil {
638643
proxyInfoMap["is_support_tls_choice"] = proxyDetail.IsSupportTLSChoice
639644
}
645+
if proxyDetail.IsAutoScaleProxy != nil {
646+
proxyInfoMap["is_auto_scale_proxy"] = proxyDetail.IsAutoScaleProxy
647+
}
640648

641649
_ = d.Set("proxy_detail", []interface{}{proxyInfoMap})
642650
}

website/docs/d/gaap_proxies.html.markdown

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ In addition to all arguments above, the following attributes are exported:
5151
* `forward_ip` - Forwarding IP of the GAAP proxy.
5252
* `id` - ID of the GAAP proxy.
5353
* `ip` - Access domain of the GAAP proxy.
54+
* `is_auto_scale_proxy` - Indicates whether the auto scale channel is enabled, with 0 for no and 1 for yes.
5455
* `name` - Name of the GAAP proxy.
5556
* `policy_id` - Security policy ID of the GAAP proxy.
5657
* `project_id` - ID of the project within the GAAP proxy, '0' means is default project.

website/docs/d/gaap_proxy_detail.html.markdown

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ In addition to all arguments above, the following attributes are exported:
6060
* `ip` - IP.
6161
* `provider` - Supplier, BGP represents default, CMCC represents China Mobile, CUCC represents China Unicom, and CTCC represents China Telecom.
6262
* `ip` - IP.
63+
* `is_auto_scale_proxy` - Indicates whether the auto scale channel is enabled, with 0 for no and 1 for yes.
6364
* `is_support_tls_choice` - Whether to allow TLS configuration.0-no support, 1-expressed support.
6465
* `modify_config_time` - Configuration change timeNote: This field may return null, indicating that a valid value cannot be obtained.
6566
* `network_type` - Network type: normal represents regular BGP, cn2 represents premium BGP, triple represents triple network, secure_EIP represents customized security EIPNote: This field may return null, indicating that a valid value cannot be obtained.

0 commit comments

Comments
 (0)