Added a query_resource function for Puppet.

Like the description says.  It's working well for me, hope it's useful to you upstream!