The function just need the hostname:
iex(11)> :inet.getaddr('www.google.com', :inet) {:ok, {142, 250, 185, 100}}