@@ -232,7 +232,6 @@ func resourceApplication() *schema.Resource {
232
232
"scheduler_configuration" : {
233
233
Type : schema .TypeList ,
234
234
Optional : true ,
235
- Computed : true ,
236
235
MaxItems : 1 ,
237
236
Elem : & schema.Resource {
238
237
Schema : map [string ]* schema.Schema {
@@ -379,7 +378,7 @@ func resourceApplicationRead(ctx context.Context, d *schema.ResourceData, meta a
379
378
return sdkdiag .AppendErrorf (diags , "setting network_configuration: %s" , err )
380
379
}
381
380
382
- if err := d .Set ("scheduler_configuration" , [] any { flattenSchedulerConfiguration (application .SchedulerConfiguration )} ); err != nil {
381
+ if err := d .Set ("scheduler_configuration" , flattenSchedulerConfiguration (application .SchedulerConfiguration )); err != nil {
383
382
return sdkdiag .AppendErrorf (diags , "setting scheduler_configuration: %s" , err )
384
383
}
385
384
@@ -432,6 +431,8 @@ func resourceApplicationUpdate(ctx context.Context, d *schema.ResourceData, meta
432
431
433
432
if v , ok := d .GetOk ("scheduler_configuration" ); ok && len (v .([]any )) > 0 && v .([]any )[0 ] != nil {
434
433
input .SchedulerConfiguration = expandSchedulerConfiguration (v .([]any )[0 ].(map [string ]any ))
434
+ } else {
435
+ input .SchedulerConfiguration = & types.SchedulerConfiguration {}
435
436
}
436
437
437
438
if v , ok := d .GetOk ("release_label" ); ok {
@@ -915,7 +916,7 @@ func expandSchedulerConfiguration(tfMap map[string]any) *types.SchedulerConfigur
915
916
return apiObject
916
917
}
917
918
918
- func flattenSchedulerConfiguration (apiObject * types.SchedulerConfiguration ) map [ string ]any {
919
+ func flattenSchedulerConfiguration (apiObject * types.SchedulerConfiguration ) [ ]any {
919
920
if apiObject == nil {
920
921
return nil
921
922
}
@@ -928,5 +929,5 @@ func flattenSchedulerConfiguration(apiObject *types.SchedulerConfiguration) map[
928
929
if v := apiObject .QueueTimeoutMinutes ; v != nil {
929
930
tfMap ["queue_timeout_minutes" ] = aws .ToInt32 (v )
930
931
}
931
- return tfMap
932
+ return [] any { tfMap }
932
933
}
0 commit comments