Skip to content

Commit 3944cfb

Browse files
committed
fix bandwidth change
1 parent 0e91893 commit 3944cfb

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tencentcloud/resource_tc_eip.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ func resourceTencentCloudEip() *schema.Resource {
102102
"internet_max_bandwidth_out": {
103103
Type: schema.TypeInt,
104104
Optional: true,
105+
Computed: true,
105106
Description: "The bandwidth limit of EIP, unit is Mbps.",
106107
},
107108
"tags": {
@@ -291,8 +292,12 @@ func resourceTencentCloudEipRead(d *schema.ResourceData, meta interface{}) error
291292
_ = d.Set("public_ip", eip.AddressIp)
292293
_ = d.Set("status", eip.AddressStatus)
293294
_ = d.Set("internet_charge_type", eip.InternetChargeType)
294-
_ = d.Set("internet_max_bandwidth_out", eip.Bandwidth)
295295
_ = d.Set("tags", tags)
296+
297+
if eip.Bandwidth != nil {
298+
_ = d.Set("internet_max_bandwidth_out", eip.Bandwidth)
299+
}
300+
296301
if bgp != nil {
297302
_ = d.Set("bandwidth_package_id", bgp.BandwidthPackageId)
298303
}

0 commit comments

Comments
 (0)