@@ -479,6 +479,14 @@ https://dev.mysql.com/doc/refman/8.0/en/data-types.html`,
479
479
},
480
480
},
481
481
},
482
+ "max_concurrent_backfill_tasks" : {
483
+ Type : schema .TypeInt ,
484
+ Computed : true ,
485
+ Optional : true ,
486
+ ValidateFunc : validation .IntAtLeast (0 ),
487
+ Description : `Maximum number of concurrent backfill tasks. The number should be non negative.
488
+ If not set (or set to 0), the system's default value will be used.` ,
489
+ },
482
490
"max_concurrent_cdc_tasks" : {
483
491
Type : schema .TypeInt ,
484
492
Computed : true ,
@@ -1741,6 +1749,8 @@ func flattenDatastreamStreamSourceConfigMysqlSourceConfig(v interface{}, d *sche
1741
1749
flattenDatastreamStreamSourceConfigMysqlSourceConfigExcludeObjects (original ["excludeObjects" ], d , config )
1742
1750
transformed ["max_concurrent_cdc_tasks" ] =
1743
1751
flattenDatastreamStreamSourceConfigMysqlSourceConfigMaxConcurrentCdcTasks (original ["maxConcurrentCdcTasks" ], d , config )
1752
+ transformed ["max_concurrent_backfill_tasks" ] =
1753
+ flattenDatastreamStreamSourceConfigMysqlSourceConfigMaxConcurrentBackfillTasks (original ["maxConcurrentBackfillTasks" ], d , config )
1744
1754
return []interface {}{transformed }
1745
1755
}
1746
1756
func flattenDatastreamStreamSourceConfigMysqlSourceConfigIncludeObjects (v interface {}, d * schema.ResourceData , config * transport_tpg.Config ) interface {} {
@@ -2034,6 +2044,23 @@ func flattenDatastreamStreamSourceConfigMysqlSourceConfigMaxConcurrentCdcTasks(v
2034
2044
return v // let terraform core handle it otherwise
2035
2045
}
2036
2046
2047
+ func flattenDatastreamStreamSourceConfigMysqlSourceConfigMaxConcurrentBackfillTasks (v interface {}, d * schema.ResourceData , config * transport_tpg.Config ) interface {} {
2048
+ // Handles the string fixed64 format
2049
+ if strVal , ok := v .(string ); ok {
2050
+ if intVal , err := StringToFixed64 (strVal ); err == nil {
2051
+ return intVal
2052
+ }
2053
+ }
2054
+
2055
+ // number values are represented as float64
2056
+ if floatVal , ok := v .(float64 ); ok {
2057
+ intVal := int (floatVal )
2058
+ return intVal
2059
+ }
2060
+
2061
+ return v // let terraform core handle it otherwise
2062
+ }
2063
+
2037
2064
func flattenDatastreamStreamSourceConfigOracleSourceConfig (v interface {}, d * schema.ResourceData , config * transport_tpg.Config ) interface {} {
2038
2065
if v == nil {
2039
2066
return nil
@@ -3609,6 +3636,13 @@ func expandDatastreamStreamSourceConfigMysqlSourceConfig(v interface{}, d tpgres
3609
3636
transformed ["maxConcurrentCdcTasks" ] = transformedMaxConcurrentCdcTasks
3610
3637
}
3611
3638
3639
+ transformedMaxConcurrentBackfillTasks , err := expandDatastreamStreamSourceConfigMysqlSourceConfigMaxConcurrentBackfillTasks (original ["max_concurrent_backfill_tasks" ], d , config )
3640
+ if err != nil {
3641
+ return nil , err
3642
+ } else {
3643
+ transformed ["maxConcurrentBackfillTasks" ] = transformedMaxConcurrentBackfillTasks
3644
+ }
3645
+
3612
3646
return transformed , nil
3613
3647
}
3614
3648
@@ -3970,6 +4004,10 @@ func expandDatastreamStreamSourceConfigMysqlSourceConfigMaxConcurrentCdcTasks(v
3970
4004
return v , nil
3971
4005
}
3972
4006
4007
+ func expandDatastreamStreamSourceConfigMysqlSourceConfigMaxConcurrentBackfillTasks (v interface {}, d tpgresource.TerraformResourceData , config * transport_tpg.Config ) (interface {}, error ) {
4008
+ return v , nil
4009
+ }
4010
+
3973
4011
func expandDatastreamStreamSourceConfigOracleSourceConfig (v interface {}, d tpgresource.TerraformResourceData , config * transport_tpg.Config ) (interface {}, error ) {
3974
4012
l := v .([]interface {})
3975
4013
if len (l ) == 0 {
0 commit comments