Rather than checking whether their IP exists and logging it, why not just check whether it doesn't exist? The rule below will check whether their IP exists in the data group. If it doesn't, we'll drop them.
when HTTP_REQUEST {
Check if the client IP is a member of the exception list
log local0.debug "IRule has been triggered"
if { ! [class match [IP::client_addr] eq ip_exception] } {
drop
log local0.debug "[IP::client_addr] Your IP was NOT approved via the exception list"
}
}
If you'd like to add data to your external class, I suspect just using a file editor would work?