@@ -807,7 +807,7 @@ func expandContainerAwsClusterAuthorization(o interface{}) *containeraws.Cluster
807807 return containeraws .EmptyClusterAuthorization
808808 }
809809 objArr := o .([]interface {})
810- if len (objArr ) == 0 {
810+ if len (objArr ) == 0 || objArr [ 0 ] == nil {
811811 return containeraws .EmptyClusterAuthorization
812812 }
813813 obj := objArr [0 ].(map [string ]interface {})
@@ -833,7 +833,7 @@ func expandContainerAwsClusterAuthorizationAdminUsersArray(o interface{}) []cont
833833 }
834834
835835 objs := o .([]interface {})
836- if len (objs ) == 0 {
836+ if len (objs ) == 0 || objs [ 0 ] == nil {
837837 return make ([]containeraws.ClusterAuthorizationAdminUsers , 0 )
838838 }
839839
@@ -888,7 +888,7 @@ func expandContainerAwsClusterControlPlane(o interface{}) *containeraws.ClusterC
888888 return containeraws .EmptyClusterControlPlane
889889 }
890890 objArr := o .([]interface {})
891- if len (objArr ) == 0 {
891+ if len (objArr ) == 0 || objArr [ 0 ] == nil {
892892 return containeraws .EmptyClusterControlPlane
893893 }
894894 obj := objArr [0 ].(map [string ]interface {})
@@ -938,7 +938,7 @@ func expandContainerAwsClusterControlPlaneAwsServicesAuthentication(o interface{
938938 return containeraws .EmptyClusterControlPlaneAwsServicesAuthentication
939939 }
940940 objArr := o .([]interface {})
941- if len (objArr ) == 0 {
941+ if len (objArr ) == 0 || objArr [ 0 ] == nil {
942942 return containeraws .EmptyClusterControlPlaneAwsServicesAuthentication
943943 }
944944 obj := objArr [0 ].(map [string ]interface {})
@@ -966,7 +966,7 @@ func expandContainerAwsClusterControlPlaneConfigEncryption(o interface{}) *conta
966966 return containeraws .EmptyClusterControlPlaneConfigEncryption
967967 }
968968 objArr := o .([]interface {})
969- if len (objArr ) == 0 {
969+ if len (objArr ) == 0 || objArr [ 0 ] == nil {
970970 return containeraws .EmptyClusterControlPlaneConfigEncryption
971971 }
972972 obj := objArr [0 ].(map [string ]interface {})
@@ -992,7 +992,7 @@ func expandContainerAwsClusterControlPlaneDatabaseEncryption(o interface{}) *con
992992 return containeraws .EmptyClusterControlPlaneDatabaseEncryption
993993 }
994994 objArr := o .([]interface {})
995- if len (objArr ) == 0 {
995+ if len (objArr ) == 0 || objArr [ 0 ] == nil {
996996 return containeraws .EmptyClusterControlPlaneDatabaseEncryption
997997 }
998998 obj := objArr [0 ].(map [string ]interface {})
@@ -1018,7 +1018,7 @@ func expandContainerAwsClusterControlPlaneMainVolume(o interface{}) *containeraw
10181018 return nil
10191019 }
10201020 objArr := o .([]interface {})
1021- if len (objArr ) == 0 {
1021+ if len (objArr ) == 0 || objArr [ 0 ] == nil {
10221022 return nil
10231023 }
10241024 obj := objArr [0 ].(map [string ]interface {})
@@ -1050,7 +1050,7 @@ func expandContainerAwsClusterControlPlaneProxyConfig(o interface{}) *containera
10501050 return containeraws .EmptyClusterControlPlaneProxyConfig
10511051 }
10521052 objArr := o .([]interface {})
1053- if len (objArr ) == 0 {
1053+ if len (objArr ) == 0 || objArr [ 0 ] == nil {
10541054 return containeraws .EmptyClusterControlPlaneProxyConfig
10551055 }
10561056 obj := objArr [0 ].(map [string ]interface {})
@@ -1078,7 +1078,7 @@ func expandContainerAwsClusterControlPlaneRootVolume(o interface{}) *containeraw
10781078 return nil
10791079 }
10801080 objArr := o .([]interface {})
1081- if len (objArr ) == 0 {
1081+ if len (objArr ) == 0 || objArr [ 0 ] == nil {
10821082 return nil
10831083 }
10841084 obj := objArr [0 ].(map [string ]interface {})
@@ -1110,7 +1110,7 @@ func expandContainerAwsClusterControlPlaneSshConfig(o interface{}) *containeraws
11101110 return containeraws .EmptyClusterControlPlaneSshConfig
11111111 }
11121112 objArr := o .([]interface {})
1113- if len (objArr ) == 0 {
1113+ if len (objArr ) == 0 || objArr [ 0 ] == nil {
11141114 return containeraws .EmptyClusterControlPlaneSshConfig
11151115 }
11161116 obj := objArr [0 ].(map [string ]interface {})
@@ -1136,7 +1136,7 @@ func expandContainerAwsClusterFleet(o interface{}) *containeraws.ClusterFleet {
11361136 return containeraws .EmptyClusterFleet
11371137 }
11381138 objArr := o .([]interface {})
1139- if len (objArr ) == 0 {
1139+ if len (objArr ) == 0 || objArr [ 0 ] == nil {
11401140 return containeraws .EmptyClusterFleet
11411141 }
11421142 obj := objArr [0 ].(map [string ]interface {})
@@ -1163,7 +1163,7 @@ func expandContainerAwsClusterNetworking(o interface{}) *containeraws.ClusterNet
11631163 return containeraws .EmptyClusterNetworking
11641164 }
11651165 objArr := o .([]interface {})
1166- if len (objArr ) == 0 {
1166+ if len (objArr ) == 0 || objArr [ 0 ] == nil {
11671167 return containeraws .EmptyClusterNetworking
11681168 }
11691169 obj := objArr [0 ].(map [string ]interface {})
0 commit comments