@@ -411,21 +411,21 @@ func expandBeyondcorpSecurityGatewayApplicationUpstreamsProxyProtocolContextualH
411411 transformedUserInfo , err := expandBeyondcorpSecurityGatewayApplicationUpstreamsProxyProtocolContextualHeadersUserInfo (original ["user_info" ], d , config )
412412 if err != nil {
413413 return nil , err
414- } else if val := reflect . ValueOf ( transformedUserInfo ); val . IsValid () && ! tpgresource . IsEmptyValue ( val ) {
414+ } else {
415415 transformed ["userInfo" ] = transformedUserInfo
416416 }
417417
418418 transformedGroupInfo , err := expandBeyondcorpSecurityGatewayApplicationUpstreamsProxyProtocolContextualHeadersGroupInfo (original ["group_info" ], d , config )
419419 if err != nil {
420420 return nil , err
421- } else if val := reflect . ValueOf ( transformedGroupInfo ); val . IsValid () && ! tpgresource . IsEmptyValue ( val ) {
421+ } else {
422422 transformed ["groupInfo" ] = transformedGroupInfo
423423 }
424424
425425 transformedDeviceInfo , err := expandBeyondcorpSecurityGatewayApplicationUpstreamsProxyProtocolContextualHeadersDeviceInfo (original ["device_info" ], d , config )
426426 if err != nil {
427427 return nil , err
428- } else if val := reflect . ValueOf ( transformedDeviceInfo ); val . IsValid () && ! tpgresource . IsEmptyValue ( val ) {
428+ } else {
429429 transformed ["deviceInfo" ] = transformedDeviceInfo
430430 }
431431
@@ -444,9 +444,14 @@ func expandBeyondcorpSecurityGatewayApplicationUpstreamsProxyProtocolContextualH
444444 return nil , nil
445445 }
446446 l := v .([]interface {})
447- if len (l ) == 0 || l [ 0 ] == nil {
447+ if len (l ) == 0 {
448448 return nil , nil
449449 }
450+
451+ if l [0 ] == nil {
452+ transformed := make (map [string ]interface {})
453+ return transformed , nil
454+ }
450455 raw := l [0 ]
451456 original := raw .(map [string ]interface {})
452457 transformed := make (map [string ]interface {})
@@ -470,9 +475,14 @@ func expandBeyondcorpSecurityGatewayApplicationUpstreamsProxyProtocolContextualH
470475 return nil , nil
471476 }
472477 l := v .([]interface {})
473- if len (l ) == 0 || l [ 0 ] == nil {
478+ if len (l ) == 0 {
474479 return nil , nil
475480 }
481+
482+ if l [0 ] == nil {
483+ transformed := make (map [string ]interface {})
484+ return transformed , nil
485+ }
476486 raw := l [0 ]
477487 original := raw .(map [string ]interface {})
478488 transformed := make (map [string ]interface {})
@@ -496,9 +506,14 @@ func expandBeyondcorpSecurityGatewayApplicationUpstreamsProxyProtocolContextualH
496506 return nil , nil
497507 }
498508 l := v .([]interface {})
499- if len (l ) == 0 || l [ 0 ] == nil {
509+ if len (l ) == 0 {
500510 return nil , nil
501511 }
512+
513+ if l [0 ] == nil {
514+ transformed := make (map [string ]interface {})
515+ return transformed , nil
516+ }
502517 raw := l [0 ]
503518 original := raw .(map [string ]interface {})
504519 transformed := make (map [string ]interface {})
0 commit comments