@@ -62,6 +62,12 @@ func resourceTencentCloudVpcBandwidthPackage() *schema.Resource {
6262 Description : "Bandwidth package name." ,
6363 },
6464
65+ "internet_max_bandwidth" : {
66+ Type : schema .TypeInt ,
67+ Optional : true ,
68+ Description : "Bandwidth packet speed limit size. Unit: Mbps, -1 means no speed limit." ,
69+ },
70+
6571 "tags" : {
6672 Type : schema .TypeMap ,
6773 Optional : true ,
@@ -94,6 +100,10 @@ func resourceTencentCloudVpcBandwidthPackageCreate(d *schema.ResourceData, meta
94100 request .BandwidthPackageName = helper .String (v .(string ))
95101 }
96102
103+ if v , ok := d .GetOk ("internet_max_bandwidth" ); ok {
104+ request .InternetMaxBandwidth = helper .IntInt64 (v .(int ))
105+ }
106+
97107 if v := helper .GetTags (d , "tags" ); len (v ) > 0 {
98108 for tagKey , tagValue := range v {
99109 tag := vpc.Tag {
@@ -194,6 +204,10 @@ func resourceTencentCloudVpcBandwidthPackageRead(d *schema.ResourceData, meta in
194204 _ = d .Set ("bandwidth_package_name" , bandwidthPackage .BandwidthPackageName )
195205 }
196206
207+ if bandwidthPackage .Bandwidth != nil {
208+ _ = d .Set ("internet_max_bandwidth" , bandwidthPackage .Bandwidth )
209+ }
210+
197211 tcClient := meta .(* TencentCloudClient ).apiV3Conn
198212 tagService := & TagService {client : tcClient }
199213 tags , err := tagService .DescribeResourceTags (ctx , "vpc" , "bandwidthPackage" , tcClient .Region , d .Id ())
@@ -234,6 +248,10 @@ func resourceTencentCloudVpcBandwidthPackageUpdate(d *schema.ResourceData, meta
234248 return fmt .Errorf ("`protocol` do not support change now." )
235249 }
236250
251+ if d .HasChange ("internet_max_bandwidth" ) {
252+ return fmt .Errorf ("`internet_max_bandwidth` do not support change now." )
253+ }
254+
237255 if d .HasChange ("charge_type" ) {
238256 if v , ok := d .GetOk ("charge_type" ); ok {
239257 request .ChargeType = helper .String (v .(string ))
0 commit comments