@@ -175,7 +175,16 @@ func TencentMsyqlBasicInfo() map[string]*schema.Schema {
175
175
},
176
176
Description : "Security groups to use." ,
177
177
},
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
+ },
179
188
"tags" : {
180
189
Type : schema .TypeMap ,
181
190
Optional : true ,
@@ -430,6 +439,15 @@ func mysqlAllInstanceRoleSet(ctx context.Context, requestInter interface{}, d *s
430
439
requestByUse .SecurityGroup = requestSecurityGroup
431
440
}
432
441
}
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
+ }
433
451
return nil
434
452
435
453
}
@@ -1003,8 +1021,12 @@ func mysqlAllInstanceRoleUpdate(ctx context.Context, d *schema.ResourceData, met
1003
1021
memSize := int64 (d .Get ("mem_size" ).(int ))
1004
1022
cpu := int64 (d .Get ("cpu" ).(int ))
1005
1023
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
+ }
1006
1028
1007
- asyncRequestId , err := mysqlService .UpgradeDBInstance (ctx , d .Id (), memSize , cpu , volumeSize )
1029
+ asyncRequestId , err := mysqlService .UpgradeDBInstance (ctx , d .Id (), memSize , cpu , volumeSize , fastUpgrade )
1008
1030
1009
1031
if err != nil {
1010
1032
return err
@@ -1094,6 +1116,9 @@ func mysqlAllInstanceRoleUpdate(ctx context.Context, d *schema.ResourceData, met
1094
1116
d .SetPartial ("tags" )
1095
1117
}
1096
1118
1119
+ if d .HasChange ("param_template_id" ) {
1120
+ return fmt .Errorf ("argument `param_template_id` cannot be modified for now" )
1121
+ }
1097
1122
return nil
1098
1123
}
1099
1124
0 commit comments