@@ -297,6 +297,12 @@ func ResourceRedisCloudProDatabase() *schema.Resource {
297297 Optional : true ,
298298 Default : true ,
299299 },
300+ "auto_minor_version_upgrade" : {
301+ Description : "When 'true', enables auto minor version upgrades for this database. Default: 'true'" ,
302+ Type : schema .TypeBool ,
303+ Optional : true ,
304+ Default : true ,
305+ },
300306 "port" : {
301307 Description : "TCP port on which the database is available" ,
302308 Type : schema .TypeInt ,
@@ -436,6 +442,10 @@ func resourceRedisCloudProDatabaseCreate(ctx context.Context, d *schema.Resource
436442 createDatabase .RespVersion = s
437443 })
438444
445+ utils .SetBool (d , "auto_minor_version_upgrade" , func (b * bool ) {
446+ createDatabase .AutoMinorVersionUpgrade = b
447+ })
448+
439449 // Confirm sub is ready to accept a db request
440450 if err := utils .WaitForSubscriptionToBeActive (ctx , subId , api ); err != nil {
441451 return diag .FromErr (err )
@@ -731,12 +741,13 @@ func resourceRedisCloudProDatabaseUpdate(ctx context.Context, d *schema.Resource
731741 Value : utils .GetInt (d , "throughput_measurement_value" ),
732742 },
733743
734- DataPersistence : utils .GetString (d , "data_persistence" ),
735- DataEvictionPolicy : utils .GetString (d , "data_eviction" ),
736- SourceIP : utils .SetToStringSlice (d .Get ("source_ips" ).(* schema.Set )),
737- Alerts : & alerts ,
738- RemoteBackup : BuildBackupPlan (d .Get ("remote_backup" ).([]interface {}), d .Get ("periodic_backup_path" )),
739- EnableDefaultUser : utils .GetBool (d , "enable_default_user" ),
744+ DataPersistence : utils .GetString (d , "data_persistence" ),
745+ DataEvictionPolicy : utils .GetString (d , "data_eviction" ),
746+ SourceIP : utils .SetToStringSlice (d .Get ("source_ips" ).(* schema.Set )),
747+ Alerts : & alerts ,
748+ RemoteBackup : BuildBackupPlan (d .Get ("remote_backup" ).([]interface {}), d .Get ("periodic_backup_path" )),
749+ EnableDefaultUser : utils .GetBool (d , "enable_default_user" ),
750+ AutoMinorVersionUpgrade : utils .GetBool (d , "auto_minor_version_upgrade" ),
740751 }
741752
742753 // One of the following fields must be set, validation is handled in the schema (ExactlyOneOf)
0 commit comments