@@ -175,7 +175,16 @@ func TencentMsyqlBasicInfo() map[string]*schema.Schema {
175175 },
176176 Description : "Security groups to use." ,
177177 },
178-
178+ "param_template_id" : {
179+ Type : schema .TypeInt ,
180+ Optional : true ,
181+ Description : "Specify parameter template id." ,
182+ },
183+ "fast_upgrade" : {
184+ Type : schema .TypeInt ,
185+ Optional : true ,
186+ Description : "Specify whether to enable fast upgrade when upgrade instance spec, available value: `1` - enabled, `0` - disabled." ,
187+ },
179188 "tags" : {
180189 Type : schema .TypeMap ,
181190 Optional : true ,
@@ -430,6 +439,15 @@ func mysqlAllInstanceRoleSet(ctx context.Context, requestInter interface{}, d *s
430439 requestByUse .SecurityGroup = requestSecurityGroup
431440 }
432441 }
442+
443+ if v , ok := d .GetOk ("param_template_id" ); ok {
444+ paramTemplateId := helper .IntInt64 (v .(int ))
445+ if okByMonth {
446+ requestByMonth .ParamTemplateId = paramTemplateId
447+ } else {
448+ requestByUse .ParamTemplateId = paramTemplateId
449+ }
450+ }
433451 return nil
434452
435453}
@@ -1003,8 +1021,12 @@ func mysqlAllInstanceRoleUpdate(ctx context.Context, d *schema.ResourceData, met
10031021 memSize := int64 (d .Get ("mem_size" ).(int ))
10041022 cpu := int64 (d .Get ("cpu" ).(int ))
10051023 volumeSize := int64 (d .Get ("volume_size" ).(int ))
1024+ fastUpgrade := int64 (0 )
1025+ if v , ok := d .GetOk ("fast_upgrade" ); ok {
1026+ fastUpgrade = int64 (v .(int ))
1027+ }
10061028
1007- asyncRequestId , err := mysqlService .UpgradeDBInstance (ctx , d .Id (), memSize , cpu , volumeSize )
1029+ asyncRequestId , err := mysqlService .UpgradeDBInstance (ctx , d .Id (), memSize , cpu , volumeSize , fastUpgrade )
10081030
10091031 if err != nil {
10101032 return err
@@ -1094,6 +1116,9 @@ func mysqlAllInstanceRoleUpdate(ctx context.Context, d *schema.ResourceData, met
10941116 d .SetPartial ("tags" )
10951117 }
10961118
1119+ if d .HasChange ("param_template_id" ) {
1120+ return fmt .Errorf ("argument `param_template_id` cannot be modified for now" )
1121+ }
10971122 return nil
10981123}
10991124
0 commit comments