File tree Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change 1+ ```release-note:bug
2+ compute: fixed a panic on empty `target_size` in `google_compute_region_instance_group_manager`
3+ ```
Original file line number Diff line number Diff line change @@ -789,12 +789,14 @@ func expandFixedOrPercent(configured []interface{}) *computeBeta.FixedOrPercent
789789 fixedOrPercent := & computeBeta.FixedOrPercent {}
790790
791791 for _ , raw := range configured {
792- data := raw .(map [string ]interface {})
793- if percent := data ["percent" ]; percent .(int ) > 0 {
794- fixedOrPercent .Percent = int64 (percent .(int ))
795- } else {
796- fixedOrPercent .Fixed = int64 (data ["fixed" ].(int ))
797- fixedOrPercent .ForceSendFields = []string {"Fixed" }
792+ if raw != nil {
793+ data := raw .(map [string ]interface {})
794+ if percent := data ["percent" ]; percent .(int ) > 0 {
795+ fixedOrPercent .Percent = int64 (percent .(int ))
796+ } else {
797+ fixedOrPercent .Fixed = int64 (data ["fixed" ].(int ))
798+ fixedOrPercent .ForceSendFields = []string {"Fixed" }
799+ }
798800 }
799801 }
800802 return fixedOrPercent
You can’t perform that action at this time.
0 commit comments