Skip to content

Commit

Permalink
add null check for lb_listener forward action config
Browse files Browse the repository at this point in the history
Signed-off-by: Erhan Cagirici <[email protected]>
  • Loading branch information
erhancagirici authored and turkenf committed Oct 30, 2024
1 parent bc5eeb3 commit 0814300
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/service/elbv2/listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -1236,7 +1236,7 @@ func flattenForwardActionOneOf(actions cty.Value, i int, awsAction awstypes.Acti
action := actions.Index(index)
if action.IsKnown() && !action.IsNull() {
forward := action.GetAttr("forward")
if forward.IsKnown() && forward.LengthInt() > 0 {
if forward.IsKnown() && !forward.IsNull() && forward.LengthInt() > 0 {
actionMap["forward"] = flattenListenerActionForwardConfig(awsAction.ForwardConfig)
} else {
actionMap["target_group_arn"] = aws.ToString(awsAction.TargetGroupArn)
Expand Down

0 comments on commit 0814300

Please sign in to comment.