I think you're thinking that get_resource returns the resource itself, from which you can then get attributes. This is not correct: get_resource returns the UUID of the port. That's why db_ports gives the output it does.
db_ips: