Use Puppet's own create_resources function if available