Add additional params to get_target_from_rule method in ec2_group

Fixes #7592